public class TimestampLocalTZWritable extends Object implements org.apache.hadoop.io.WritableComparable<TimestampLocalTZWritable>
Timestamp
with LocalDateTime
for Timestamp,
it'll need a new Writable.
All timestamp with time zone will be serialized as UTC retaining the instant.
E.g. "2017-04-14 18:00:00 Asia/Shanghai" will be converted to
"2017-04-14 10:00:00.0 Z".Modifier and Type | Field and Description |
---|---|
static int |
BINARY_SORTABLE_LENGTH |
static int |
MAX_BYTES
The maximum number of bytes required for a TimestampWritableV2
|
static byte[] |
nullBytes |
Constructor and Description |
---|
TimestampLocalTZWritable() |
TimestampLocalTZWritable(byte[] bytes,
int offset,
ZoneId timeZone) |
TimestampLocalTZWritable(TimestampLocalTZWritable other) |
TimestampLocalTZWritable(TimestampTZ tstz) |
Modifier and Type | Method and Description |
---|---|
int |
compareTo(TimestampLocalTZWritable o) |
boolean |
equals(Object o) |
void |
fromBinarySortable(byte[] bytes,
int binSortOffset,
ZoneId timeZone) |
byte[] |
getBytes()
Used to create copies of objects
|
int |
getNanos() |
static int |
getNanos(byte[] bytes,
int offset) |
long |
getSeconds() |
static long |
getSeconds(byte[] bytes,
int offset) |
TimestampTZ |
getTimestampTZ() |
ZoneId |
getTimeZone() |
static int |
getTotalLength(byte[] bytes,
int offset) |
int |
hashCode() |
void |
readFields(DataInput dataInput) |
void |
set(byte[] bytes,
int offset,
ZoneId timeZone) |
void |
set(TimestampLocalTZWritable t) |
void |
set(TimestampTZ tstz) |
static void |
setTimestampTZ(TimestampTZ t,
byte[] bytes,
int offset,
ZoneId timeZone) |
void |
setTimeZone(ZoneId timeZone) |
byte[] |
toBinarySortable() |
String |
toString() |
void |
write(DataOutput dataOutput) |
void |
writeToByteStream(ByteStream.RandomAccessOutput byteStream) |
public static final byte[] nullBytes
public static final int MAX_BYTES
public static final int BINARY_SORTABLE_LENGTH
public TimestampLocalTZWritable()
public TimestampLocalTZWritable(byte[] bytes, int offset, ZoneId timeZone)
public TimestampLocalTZWritable(TimestampLocalTZWritable other)
public TimestampLocalTZWritable(TimestampTZ tstz)
public void set(byte[] bytes, int offset, ZoneId timeZone)
public void set(TimestampTZ tstz)
public void set(TimestampLocalTZWritable t)
public void setTimeZone(ZoneId timeZone)
public ZoneId getTimeZone()
public TimestampTZ getTimestampTZ()
public byte[] getBytes()
public long getSeconds()
public int getNanos()
public int compareTo(TimestampLocalTZWritable o)
compareTo
in interface Comparable<TimestampLocalTZWritable>
public void write(DataOutput dataOutput) throws IOException
write
in interface org.apache.hadoop.io.Writable
IOException
public void readFields(DataInput dataInput) throws IOException
readFields
in interface org.apache.hadoop.io.Writable
IOException
public byte[] toBinarySortable()
public void fromBinarySortable(byte[] bytes, int binSortOffset, ZoneId timeZone)
public void writeToByteStream(ByteStream.RandomAccessOutput byteStream)
public static void setTimestampTZ(TimestampTZ t, byte[] bytes, int offset, ZoneId timeZone)
public static int getTotalLength(byte[] bytes, int offset)
public static long getSeconds(byte[] bytes, int offset)
public static int getNanos(byte[] bytes, int offset)
Copyright © 2022 The Apache Software Foundation. All rights reserved.