Skip to content

Commit

Permalink
[GOBBLIN-288] Add finer-grain dynamic partition generation for Salesf…
Browse files Browse the repository at this point in the history
Closes #2140 from
htran1/salesforce_dynamic_probing
  • Loading branch information
htran1 committed Oct 14, 2017
1 parent 07c86f2 commit 626d312
Show file tree
Hide file tree
Showing 3 changed files with 266 additions and 42 deletions.
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

0 comments on commit 626d312

Please sign in to comment.