congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
PhastPackingStage
Code IndexAdd Tabnine to your IDE (free)

How to use
PhastPackingStage
in
com.ociweb.pronghorn.stage.phast

Best Java code snippets using com.ociweb.pronghorn.stage.phast.PhastPackingStage (Showing top 8 results out of 315)

origin: oci-pronghorn/Pronghorn

protected PhastPackingStage(GraphManager graphManager, Pipe<PhastCodecSchema> input1, Pipe<RawDataSchema> input2, Pipe<RawDataSchema> output) {
  super(graphManager, join(input1,input2), output);
  this.input1 = input1;
  this.input2 = input2;
  this.output = output;
  //Does not need batching to be done by producer or consumer
  this.supportsBatchedPublish = false;
  this.supportsBatchedRelease = false;
}

origin: oci-pronghorn/Pronghorn

private int writePackedFields(int localSum, Pipe<PhastCodecSchema> localInput1,
    DataOutputBlobWriter<RawDataSchema> localWriter, int msgIdx, int localFieldCount) {
      int i = localFieldCount;
    //System.err.println("field count "+i);
    while (--i >= 0) {
      packField(localWriter, Pipe.takeLong(localInput1));                    
    }         
    localSum += localFieldCount;
    return localSum;
}
origin: oci-pronghorn/Pronghorn

@Override
public void run() {
  pump(input1, input2, output, lengthLookup, writer, input2Reader);      
}
origin: oci-pronghorn/Pronghorn

Pipe<RawDataSchema> encodedValuesToValidate = new Pipe<RawDataSchema>(new PipeConfig<RawDataSchema>(RawDataSchema.instance, 100, 4000));
PhastPackingStage stage = new PhastPackingStage(gm, testValuesToEncode, testValuesToEncode2, encodedValuesToValidate);
stage.startup();
stage.run();
Pipe.publishAllBatchedWrites(encodedValuesToValidate);
origin: oci-pronghorn/Pronghorn

private void combineContentForSingleMessage(Pipe<PhastCodecSchema> localInput1,
    Pipe<RawDataSchema> localInput2, Pipe<RawDataSchema> localOutput, short[] lookup,
    DataOutputBlobWriter<RawDataSchema> localWriter, int size, int maxPerMsg, int outputMaxLen,
    boolean holdingReleaseReadLock, DataOutputBlobWriter<RawDataSchema> writer) {
  
  int localSum = 0;
  int avail = 0;
  while ( ( (avail = (outputMaxLen - writer.length())) >= maxPerMsg) && Pipe.hasContentToRead(localInput1)) {
            
    if (holdingReleaseReadLock) {
      Pipe.releaseReadLock(localInput1);
      holdingReleaseReadLock = false;
    }
    
    int msgIdx = Pipe.takeMsgIdx(localInput1);
        if (PhastCodecSchema.MSG_BLOBCHUNK_1000 != msgIdx) {                   
      localSum = writePackedFields(localSum, localInput1, localWriter, msgIdx, (int) lookup[msgIdx]);   
    }  else {
      localSum = writeByteData(localSum, localInput2, avail);                   
    }               
    Pipe.confirmLowLevelRead(localInput1, Pipe.sizeOf(localInput1, msgIdx));
    holdingReleaseReadLock = true;                            
  }    
  assert(holdingReleaseReadLock);
  totalLongs += localSum;
      
}
origin: oci-pronghorn/Pronghorn

LongDataGenStage  genStage = new LongDataGenStage(gm, new Pipe[]{inputPipe1, inputPipe2}, iterations);      
PhastPackingStage encodeStage1 = new PhastPackingStage(gm, inputPipe1, inputPipe1B, packedDataPipe1);       
PhastPackingStage encodeStage2 = new PhastPackingStage(gm, inputPipe2, inputPipe2B, packedDataPipe2);       
origin: oci-pronghorn/Pronghorn

combineContentForSingleMessage( localInput1, localInput2, localOutput, 
                     lookup, localWriter, size, 
                     maxBytesPerMessage, localOutput.maxVarLen, 
origin: oci-pronghorn/Pronghorn

PhastPackingStage packStage = new PhastPackingStage(gm, inputPipe, inputPipe2, packedDataPipe);
PhastUnpackingStage unPackStage = new PhastUnpackingStage(gm, packedDataPipe, outputPipe1, outputPipe2 );        
PipeCleanerStage<PhastCodecSchema> dumpStage1 = new PipeCleanerStage<PhastCodecSchema>(gm, outputPipe1);        
com.ociweb.pronghorn.stage.phastPhastPackingStage

Javadoc

_no-docs_

Most used methods

  • <init>
  • combineContentForSingleMessage
  • join
  • packField
  • pump
  • run
  • startup
  • writeByteData
  • writePackedFields

Popular in Java

  • Running tasks concurrently on multiple threads
  • addToBackStack (FragmentTransaction)
  • compareTo (BigDecimal)
  • onCreateOptionsMenu (Activity)
  • Component (java.awt)
    A component is an object having a graphical representation that can be displayed on the screen and t
  • Menu (java.awt)
  • BufferedReader (java.io)
    Wraps an existing Reader and buffers the input. Expensive interaction with the underlying reader is
  • SocketTimeoutException (java.net)
    This exception is thrown when a timeout expired on a socket read or accept operation.
  • Date (java.util)
    A specific moment in time, with millisecond precision. Values typically come from System#currentTime
  • Properties (java.util)
    A Properties object is a Hashtable where the keys and values must be Strings. Each property can have
  • PhpStorm for WordPress
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now