public class DateWritableV2 extends Object implements org.apache.hadoop.io.WritableComparable<DateWritableV2>
Constructor and Description |
---|
DateWritableV2() |
DateWritableV2(Date d) |
DateWritableV2(DateWritableV2 d) |
DateWritableV2(int d) |
Modifier and Type | Method and Description |
---|---|
int |
compareTo(DateWritableV2 d) |
static int |
dateToDays(Date d) |
static int |
dateToDays(Date d)
Deprecated.
|
static long |
daysToMillis(int days) |
boolean |
equals(Object o) |
Date |
get() |
int |
getDays() |
long |
getTimeInSeconds() |
int |
hashCode() |
static int |
millisToDays(long millis) |
void |
readFields(DataInput in) |
void |
set(Date d)
Set the DateWritableV2 based on the year/month/day of the date in the local timezone.
|
void |
set(DateWritableV2 d) |
void |
set(int d)
Set the DateWritableV2 based on the days since epoch date.
|
static Date |
timeToDate(long seconds) |
String |
toString() |
void |
write(DataOutput out) |
public DateWritableV2()
public DateWritableV2(DateWritableV2 d)
public DateWritableV2(Date d)
public DateWritableV2(int d)
public void set(int d)
d
- integer value representing days since epoch datepublic void set(Date d)
d
- Date valuepublic void set(DateWritableV2 d)
public Date get()
public int getDays()
public long getTimeInSeconds()
public static Date timeToDate(long seconds)
public static long daysToMillis(int days)
public static int millisToDays(long millis)
public static int dateToDays(Date d)
@Deprecated public static int dateToDays(Date d)
public void readFields(DataInput in) throws IOException
readFields
in interface org.apache.hadoop.io.Writable
IOException
public void write(DataOutput out) throws IOException
write
in interface org.apache.hadoop.io.Writable
IOException
public int compareTo(DateWritableV2 d)
compareTo
in interface Comparable<DateWritableV2>
Copyright © 2022 The Apache Software Foundation. All rights reserved.