Send feedback
Class ChunkTransformer (3.5.4)
Stay organized with collections
Save and categorize content based on your preferences.
Version 3.5.4 keyboard_arrow_down
ChunkTransformer formats all incoming chunks in to row keeps all intermediate state until end of stream. Should use new instance for each request.
Inheritance
Transform
>
ChunkTransformer
Package
@google-cloud/bigtable!
Constructors
constructor ( options ? : TransformOptions );
Constructs a new instance of the ChunkTransformer
class
Parameter
Name Description options
TransformOptions
Properties
Property Value
Property Value
Property Value
options : TransformOptions ;
Property Value
Type Description TransformOptions
Property Value
qualifiers?: Qualifier[];
Property Value
Property Value
Property Value
Methods
_flush ( cb : Function ): void ;
called at end of the stream.
Parameter
Name Description cb
Function
callback will be called with error if there is any uncommitted row
Returns
_transform ( data : Data , enc : string , next : Function ): void ;
transform the readrowsresponse chunks into friendly format. Chunks contain 3 properties:
rowContents
The row contents, this essentially is all data pertaining to a single family.
commitRow
This is a boolean telling us the all previous chunks for this row are ok to consume.
resetRow
This is a boolean telling us that all the previous chunks are to be discarded.
Parameters
Name Description data
Data
readrows response containing array of chunks.
enc
string
encoding options.
next
Function
callback will be called once data is processed, with error if any error in processing
Returns
sets lastRowkey and calls reset when row is committed.
Returns
destroy(err?: Error): void;
called when stream is destroyed.
Parameter
Name Description err
Error
error if any
Returns
moveToNextState ( chunk : Chunk ): void ;
Moves to next state in processing.
Parameter
Name Description chunk
Chunk
chunk in process
Returns
proc essCellInProgress ( chunk : Chunk ): void ;
Process chunk when in CELl_IN_PROGRESS state.
Parameter
Name Description chunk
Chunk
chunk to process
Returns
proc essNewRow ( chunk : Chunk ): void ;
Process chunk when in NEW_ROW state.
Parameter
Name Description chunk
Chunk
chunk to process
Returns
proc essRowInProgress ( chunk : Chunk ): void ;
Process chunk when in ROW_IN_PROGRESS state.
Parameter
Name Description chunk
Chunk
chunk to process
Returns
Resets state of formatter
Returns
validateCellInProgress ( chunk : Chunk ): void ;
Validates chunk for cellInProgress state.
Parameter
Name Description chunk
Chunk
chunk to validate
Returns
validateNewRow ( chunk : Chunk , newRowKey : string | Buffer ): void ;
Validates state for new row.
Parameters
Name Description chunk
Chunk
chunk to validate
newRowKey
string | Buffer
newRowKey of the new row
Returns
validateResetRow ( chunk : Chunk ): void ;
Validates resetRow condition for chunk
Parameter
Name Description chunk
Chunk
chunk to validate for resetrow
Returns
validateRowInProgress ( chunk : Chunk ): void ;
Validates state for rowInProgress
Parameter
Name Description chunk
Chunk
chunk to validate
Returns
validateValueSizeAndCommitRow ( chunk : Chunk ): void ;
Validates valuesize and commitrow in a chunk
Parameter
Name Description chunk
Chunk
chunk to validate for valuesize and commitRow
Returns
Send feedback
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License , and code samples are licensed under the Apache 2.0 License . For details, see the Google Developers Site Policies . Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-10-10 UTC.
Need to tell us more?
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-10-10 UTC."],[],[]]