org.apache.hadoop.hive.ql.io.parquet.timestamp.NanoTime.toBinary()方法的使用及代码示例

x33g5p2x  于2022-01-25 转载在 其他  
字(3.8k)|赞(0)|评价(0)|浏览(150)

本文整理了Java中org.apache.hadoop.hive.ql.io.parquet.timestamp.NanoTime.toBinary()方法的一些代码示例,展示了NanoTime.toBinary()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。NanoTime.toBinary()方法的具体详情如下:
包路径:org.apache.hadoop.hive.ql.io.parquet.timestamp.NanoTime
类名称:NanoTime
方法名:toBinary

NanoTime.toBinary介绍

暂无

代码示例

代码示例来源:origin: apache/hive

public void writeValue(RecordConsumer recordConsumer) {
 recordConsumer.addBinary(toBinary());
}

代码示例来源:origin: apache/drill

public void writeValue(RecordConsumer recordConsumer) {
 recordConsumer.addBinary(toBinary());
}

代码示例来源:origin: prestodb/presto

private static void assertTimestampCorrect(String timestampString)
  {
    Timestamp timestamp = Timestamp.valueOf(timestampString);
    Binary timestampBytes = NanoTimeUtils.getNanoTime(timestamp, false).toBinary();
    long decodedTimestampMillis = getTimestampMillis(timestampBytes);
    assertEquals(decodedTimestampMillis, timestamp.getTime());
  }
}

代码示例来源:origin: apache/hive

@Override
 public void write(Object value) {
  Timestamp ts = inspector.getPrimitiveJavaObject(value);
  recordConsumer.addBinary(NanoTimeUtils.getNanoTime(ts, false).toBinary());
 }
}

代码示例来源:origin: apache/drill

@Override
 public void write(Object value) {
  Timestamp ts = inspector.getPrimitiveJavaObject(value);
  recordConsumer.addBinary(NanoTimeUtils.getNanoTime(ts, false).toBinary());
 }
}

代码示例来源:origin: apache/hive

protected static Binary getTimestamp(
  boolean isDictionaryEncoding,
  int index) {
 NanoTime s = isDictionaryEncoding ? getNanoTime(index % UNIQUE_NUM) : getNanoTime(index);
 return s.toBinary();
}

代码示例来源:origin: prestodb/presto

case TIMESTAMP:
  Timestamp ts = ((TimestampObjectInspector) inspector).getPrimitiveJavaObject(value);
  recordConsumer.addBinary(NanoTimeUtils.getNanoTime(ts, false).toBinary());
  break;
case DECIMAL:

代码示例来源:origin: com.facebook.presto.hive/hive-apache

public void writeValue(RecordConsumer recordConsumer) {
 recordConsumer.addBinary(toBinary());
}

代码示例来源:origin: uk.co.nichesolutions.presto/presto-hive

private static void assertTimestampCorrect(String timestampString)
  {
    Timestamp timestamp = Timestamp.valueOf(timestampString);
    Binary timestampBytes = NanoTimeUtils.getNanoTime(timestamp, false).toBinary();
    long decodedTimestampMillis = getTimestampMillis(timestampBytes);
    assertEquals(decodedTimestampMillis, timestamp.getTime());
  }
}

代码示例来源:origin: com.facebook.presto/presto-parquet

private static void assertTimestampCorrect(String timestampString)
  {
    Timestamp timestamp = Timestamp.valueOf(timestampString);
    Binary timestampBytes = NanoTimeUtils.getNanoTime(timestamp, false).toBinary();
    long decodedTimestampMillis = getTimestampMillis(timestampBytes);
    assertEquals(decodedTimestampMillis, timestamp.getTime());
  }
}

代码示例来源:origin: prestosql/presto

private static void assertTimestampCorrect(String timestampString)
  {
    Timestamp timestamp = Timestamp.valueOf(timestampString);
    Binary timestampBytes = NanoTimeUtils.getNanoTime(timestamp, false).toBinary();
    long decodedTimestampMillis = getTimestampMillis(timestampBytes);
    assertEquals(decodedTimestampMillis, timestamp.getTime());
  }
}

代码示例来源:origin: com.facebook.presto.hive/hive-apache

case TIMESTAMP:
 Timestamp ts = ((TimestampObjectInspector) inspector).getPrimitiveJavaObject(value);
 recordConsumer.addBinary(NanoTimeUtils.getNanoTime(ts, false).toBinary());
 break;
case DECIMAL:

代码示例来源:origin: com.facebook.presto/presto-hive

case TIMESTAMP:
  Timestamp ts = ((TimestampObjectInspector) inspector).getPrimitiveJavaObject(value);
  recordConsumer.addBinary(NanoTimeUtils.getNanoTime(ts, false).toBinary());
  break;
case DECIMAL:

代码示例来源:origin: prestosql/presto

case TIMESTAMP:
  Timestamp ts = ((TimestampObjectInspector) inspector).getPrimitiveJavaObject(value);
  recordConsumer.addBinary(NanoTimeUtils.getNanoTime(ts, false).toBinary());
  break;
case DECIMAL:

代码示例来源:origin: io.prestosql/presto-hive

case TIMESTAMP:
  Timestamp ts = ((TimestampObjectInspector) inspector).getPrimitiveJavaObject(value);
  recordConsumer.addBinary(NanoTimeUtils.getNanoTime(ts, false).toBinary());
  break;
case DECIMAL:

相关文章