You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@storm.apache.org by sr...@apache.org on 2019/04/16 07:05:16 UTC

[storm] branch master updated: [STORM-3375] change Date.getTime() to System.currentTimeMillis()

This is an automated email from the ASF dual-hosted git repository.

srdo pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/storm.git


The following commit(s) were added to refs/heads/master by this push:
     new 362b3b6  [STORM-3375] change Date.getTime() to System.currentTimeMillis()
     new b48e105  Merge branch 'STORM-3375' of https://github.com/bd2019us/storm into asfgit-master
362b3b6 is described below

commit 362b3b6a41c784eccc2f9362b403c45623a3ea51
Author: bd2019us <bd...@126.com>
AuthorDate: Thu Apr 11 23:40:58 2019 -0500

    [STORM-3375] change Date.getTime() to System.currentTimeMillis()
---
 .../org/apache/storm/hive/bolt/mapper/DelimitedRecordHiveMapper.java   | 3 +--
 .../java/org/apache/storm/hive/bolt/mapper/JsonRecordHiveMapper.java   | 3 +--
 2 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/external/storm-hive/src/main/java/org/apache/storm/hive/bolt/mapper/DelimitedRecordHiveMapper.java b/external/storm-hive/src/main/java/org/apache/storm/hive/bolt/mapper/DelimitedRecordHiveMapper.java
index d67ec67..f6e3612 100644
--- a/external/storm-hive/src/main/java/org/apache/storm/hive/bolt/mapper/DelimitedRecordHiveMapper.java
+++ b/external/storm-hive/src/main/java/org/apache/storm/hive/bolt/mapper/DelimitedRecordHiveMapper.java
@@ -132,8 +132,7 @@ public class DelimitedRecordHiveMapper implements HiveMapper {
     }
 
     private String getPartitionsByTimeFormat() {
-        Date d = new Date();
-        return parseDate.format(d.getTime());
+        return parseDate.format(System.currentTimeMillis());
     }
 
     @VisibleForTesting
diff --git a/external/storm-hive/src/main/java/org/apache/storm/hive/bolt/mapper/JsonRecordHiveMapper.java b/external/storm-hive/src/main/java/org/apache/storm/hive/bolt/mapper/JsonRecordHiveMapper.java
index 3a43b7c..59c1bb7 100644
--- a/external/storm-hive/src/main/java/org/apache/storm/hive/bolt/mapper/JsonRecordHiveMapper.java
+++ b/external/storm-hive/src/main/java/org/apache/storm/hive/bolt/mapper/JsonRecordHiveMapper.java
@@ -119,7 +119,6 @@ public class JsonRecordHiveMapper implements HiveMapper {
     }
 
     private String getPartitionsByTimeFormat() {
-        Date d = new Date();
-        return parseDate.format(d.getTime());
+        return parseDate.format(System.currentTimeMillis());
     }
 }