Tabnine Logo
IntWritable.get
Code IndexAdd Tabnine to your IDE (free)

How to use
get
method
in
org.apache.hadoop.io.IntWritable

Best Java code snippets using org.apache.hadoop.io.IntWritable.get (Showing top 20 results out of 1,827)

Refine searchRefine arrow

  • IntWritable.set
  • IntWritable.<init>
origin: apache/hive

@Override
protected IntWritable evaluate(IntWritable left, IntWritable right) {
 if (right.get() == 0) {
  return null;
 }
 intWritable.set((((left.get() % right.get()) + right.get()) % right.get()));
 return intWritable;
}
origin: apache/hive

@Override
public Object copyObject(Object o) {
 return o == null ? null : new IntWritable(((IntWritable) o).get());
}
origin: apache/drill

private void addSimpleEvent(int operation, long currentTransaction, long rowId, Object row)
  throws IOException {
 this.operation.set(operation);
 this.currentTransaction.set(currentTransaction);
 // If this is an insert, originalTransaction should be set to this transaction.  If not,
 // it will be reset by the following if anyway.
 long originalTransaction = currentTransaction;
 if (operation == DELETE_OPERATION || operation == UPDATE_OPERATION) {
  Object rowIdValue = rowInspector.getStructFieldData(row, recIdField);
  originalTransaction = origTxnInspector.get(
    recIdInspector.getStructFieldData(rowIdValue, originalTxnField));
  rowId = rowIdInspector.get(recIdInspector.getStructFieldData(rowIdValue, rowIdField));
 }
 else if(operation == INSERT_OPERATION) {
  rowId += rowIdOffset;
 }
 this.rowId.set(rowId);
 this.originalTransaction.set(originalTransaction);
 item.setFieldValue(OrcRecordUpdater.OPERATION, new IntWritable(operation));
 item.setFieldValue(OrcRecordUpdater.ROW, (operation == DELETE_OPERATION ? null : row));
 indexBuilder.addKey(operation, originalTransaction, bucket.get(), rowId);
 if (writer == null) {
  writer = OrcFile.createWriter(path, writerOptions);
 }
 writer.addRow(item);
}
origin: apache/hive

@Override
protected IntWritable evaluate(IntWritable left, IntWritable right) {
 if (right.get() == 0) {
  return null;
 }
 intWritable.set(left.get() % right.get());
 return intWritable;
}
origin: apache/hive

LazyBinaryInteger(LazyBinaryInteger copy) {
 super(copy);
 data = new IntWritable(copy.data.get());
}
origin: apache/hive

/**
 * The INSERT event always uses {@link #bucket} that this {@link RecordUpdater} was created with
 * thus even for unbucketed tables, the N in bucket_N file name matches writerId/bucketId even for
 * late split
 */
private void addSimpleEvent(int operation, long currentWriteId, long rowId, Object row)
  throws IOException {
 this.operation.set(operation);
 this.currentWriteId.set(currentWriteId);
 Integer currentBucket = null;
 // If this is an insert, originalWriteId should be set to this transaction.  If not,
 // it will be reset by the following if anyway.
 long originalWriteId = currentWriteId;
 if (operation == DELETE_OPERATION || operation == UPDATE_OPERATION) {
  Object rowIdValue = rowInspector.getStructFieldData(row, recIdField);
  originalWriteId = origWriteIdInspector.get(
    recIdInspector.getStructFieldData(rowIdValue, originalWriteIdField));
  rowId = rowIdInspector.get(recIdInspector.getStructFieldData(rowIdValue, rowIdField));
  currentBucket = setBucket(bucketInspector.get(
   recIdInspector.getStructFieldData(rowIdValue, bucketField)), operation);
 }
 this.rowId.set(rowId);
 this.originalWriteId.set(originalWriteId);
 item.setFieldValue(OrcRecordUpdater.OPERATION, new IntWritable(operation));
 item.setFieldValue(OrcRecordUpdater.ROW, (operation == DELETE_OPERATION ? null : row));
 indexBuilder.addKey(operation, originalWriteId, bucket.get(), rowId);
 initWriter();
 writer.addRow(item);
 restoreBucket(currentBucket, operation);
}
origin: apache/hive

public IntWritable evaluate(IntWritable a, IntWritable b) {
 if (a == null || b == null) {
  return null;
 }
 intWritable.set(a.get() << b.get());
 return intWritable;
}
origin: apache/hive

public LazyInteger(LazyInteger copy) {
 super(copy);
 data = new IntWritable(copy.data.get());
}
origin: apache/hive

 return;
this.operation.set(operation);
this.currentWriteId.set(currentWriteId);
Object rowValue = rowInspector.getStructFieldData(row, recIdField);
 item.setFieldValue(OrcRecordUpdater.OPERATION, new IntWritable(DELETE_OPERATION));
 deleteEventIndexBuilder.addKey(DELETE_OPERATION, originalWriteId, bucket.get(), rowId);
 deleteEventWriter.addRow(item);
 restoreBucket(currentBucket, operation);
origin: apache/hive

public IntWritable evaluate(IntWritable a, IntWritable b) {
 if (a == null || b == null) {
  return null;
 }
 intWritable.set(a.get() >> b.get());
 return intWritable;
}
origin: apache/flink

  @Override
  public Tuple2<IntWritable, Text> map(Tuple2<IntWritable, Text> v)
  throws Exception {
    v.f0 = new IntWritable(v.f0.get() % 5);
    return v;
  }
}
origin: apache/hive

@Override
protected IntWritable evaluate(IntWritable left, IntWritable right) {
 intWritable.set(left.get() - right.get());
 return intWritable;
}
origin: apache/flink

  @Override
  public Tuple2<IntWritable, Text> map(Tuple2<IntWritable, Text> v)
  throws Exception {
    v.f0 = new IntWritable(v.f0.get() % 5);
    return v;
  }
}
origin: apache/hive

@Override
protected IntWritable evaluate(IntWritable left, IntWritable right) {
 intWritable.set(left.get() * right.get());
 return intWritable;
}
origin: apache/flink

  @Override
  public Tuple2<IntWritable, Text> map(Tuple2<IntWritable, Text> v)
  throws Exception {
    v.f0 = new IntWritable(v.f0.get() / 5);
    return v;
  }
}
origin: apache/hive

public IntWritable evaluate(IntWritable a, IntWritable b) {
 if (a == null || b == null) {
  return null;
 }
 intWritable.set(a.get() & b.get());
 return intWritable;
}
origin: apache/flink

  @Override
  public Tuple2<IntWritable, IntWritable> map(Tuple2<IntWritable, Text> v)
  throws Exception {
    outT.f0 = new IntWritable(v.f0.get() / 6);
    outT.f1 = new IntWritable(1);
    return outT;
  }
}
origin: apache/hive

public IntWritable evaluate(IntWritable a, IntWritable b) {
 if (a == null || b == null) {
  return null;
 }
 intWritable.set(a.get() | b.get());
 return intWritable;
}
origin: apache/ignite

  /** {@inheritDoc} */
  @Override protected void reduce(Text key, Iterable<IntWritable> values, Context ctx)
    throws IOException, InterruptedException {
    int s = 0;
    for (IntWritable val : values)
      s += val.get();
    System.out.println(">>>> Reduced: " + s);
    ctx.write(line, new IntWritable(s));
  }
}
origin: apache/hive

@Override
protected IntWritable evaluate(IntWritable left, IntWritable right) {
 intWritable.set(left.get() + right.get());
 return intWritable;
}
org.apache.hadoop.ioIntWritableget

Javadoc

Return the value of this IntWritable.

Popular methods of IntWritable

  • <init>
  • set
    Set the value of this IntWritable.
  • toString
  • write
  • readFields
  • compareTo
    Compares two IntWritables.
  • equals
    Returns true iff o is a IntWritable with the same value.
  • hashCode
  • getClass

Popular in Java

  • Updating database using SQL prepared statement
  • onCreateOptionsMenu (Activity)
  • getApplicationContext (Context)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • Font (java.awt)
    The Font class represents fonts, which are used to render text in a visible way. A font provides the
  • BufferedImage (java.awt.image)
    The BufferedImage subclass describes an java.awt.Image with an accessible buffer of image data. All
  • EOFException (java.io)
    Thrown when a program encounters the end of a file or stream during an input operation.
  • Permission (java.security)
    Legacy security code; do not use.
  • StringTokenizer (java.util)
    Breaks a string into tokens; new code should probably use String#split.> // Legacy code: StringTo
  • Filter (javax.servlet)
    A filter is an object that performs filtering tasks on either the request to a resource (a servlet o
  • Top 17 PhpStorm Plugins
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