Skip to content

Commit

Permalink
add new config param for s3 file partition - "currentDate"
Browse files Browse the repository at this point in the history
  • Loading branch information
Santhosh Vasabhaktula authored and Santhosh Vasabhaktula committed Mar 12, 2016
1 parent 0259422 commit ca5e159
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/main/java/com/pinterest/secor/common/LogFilePath.java
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ public class LogFilePath {
private final String mExtension;
private String mOutputFilePattern;
private SimpleDateFormat timeFormat = new SimpleDateFormat("HH-mm");
private SimpleDateFormat dateFormat = new SimpleDateFormat("YYYYMMDD");

public LogFilePath(String prefix, int generation, long lastCommittedOffset,
ParsedMessage message, String extension) {
Expand Down Expand Up @@ -198,6 +199,7 @@ private Map<String, String> getValueMap() {
valueMap.put("fmOffset", String.format("%020d", mOffset));
valueMap.put("currentTimestamp", System.currentTimeMillis() + "");
valueMap.put("currentTime", timeFormat.format(new Date()));
valueMap.put("currentDate", dateFormat.format(new Date()));
return valueMap;
}

Expand Down

0 comments on commit ca5e159

Please sign in to comment.