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

  • Start an intent from android
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • onRequestPermissionsResult (Fragment)
  • setRequestProperty (URLConnection)
  • Time (java.sql)
    Java representation of an SQL TIME value. Provides utilities to format and parse the time's represen
  • SortedMap (java.util)
    A map that has its keys ordered. The sorting is according to either the natural ordering of its keys
  • Pattern (java.util.regex)
    Patterns are compiled regular expressions. In many cases, convenience methods such as String#matches
  • ImageIO (javax.imageio)
  • JFileChooser (javax.swing)
  • Get (org.apache.hadoop.hbase.client)
    Used to perform Get operations on a single row. To get everything for a row, instantiate a Get objec
  • Top Vim plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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