Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[GOBBLIN-288] Add finer-grain dynamic partition generation for Salesf… #2140

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,17 @@ public static Date toDate(String input, String inputfmt, String outputfmt) {
return outDate;
}

public static Date toDate(String input, String inputfmt) {
final SimpleDateFormat inputFormat = new SimpleDateFormat(inputfmt);
Date outDate = null;
try {
outDate = inputFormat.parse(input);
} catch (ParseException e) {
LOG.error("Parse to date failed", e);
}
return outDate;
}

public static String epochToDate(long epoch, String format) {
SimpleDateFormat sdf = new SimpleDateFormat(format);
Date date = new Date(epoch);
Expand Down