aboutsummaryrefslogtreecommitdiff
path: root/other/java/unzip
diff options
context:
space:
mode:
authorChris Lu <chris.lu@gmail.com>2020-11-13 11:37:50 -0800
committerChris Lu <chris.lu@gmail.com>2020-11-13 11:37:53 -0800
commit7d249808407588431f00424dbb2ca599cc9441c6 (patch)
tree64968112c4174cc00efad23b5bf146d338db2a66 /other/java/unzip
parent56d8e5b540caf76f186dc17660e523dc0baa1a54 (diff)
downloadseaweedfs-7d249808407588431f00424dbb2ca599cc9441c6.tar.xz
seaweedfs-7d249808407588431f00424dbb2ca599cc9441c6.zip
HCFS: 1.5.4
Diffstat (limited to 'other/java/unzip')
-rw-r--r--other/java/unzip/pom.xml4
-rw-r--r--other/java/unzip/src/main/java/com/example/test/Example.java10
2 files changed, 12 insertions, 2 deletions
diff --git a/other/java/unzip/pom.xml b/other/java/unzip/pom.xml
index 1f86bb688..7cbb56ec3 100644
--- a/other/java/unzip/pom.xml
+++ b/other/java/unzip/pom.xml
@@ -11,13 +11,13 @@
<dependency>
<groupId>com.github.chrislusf</groupId>
<artifactId>seaweedfs-client</artifactId>
- <version>1.5.3</version>
+ <version>1.5.4</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.github.chrislusf</groupId>
<artifactId>seaweedfs-hadoop2-client</artifactId>
- <version>1.5.3</version>
+ <version>1.5.4</version>
<scope>compile</scope>
</dependency>
<dependency>
diff --git a/other/java/unzip/src/main/java/com/example/test/Example.java b/other/java/unzip/src/main/java/com/example/test/Example.java
index 393ccb5ab..3d22329a8 100644
--- a/other/java/unzip/src/main/java/com/example/test/Example.java
+++ b/other/java/unzip/src/main/java/com/example/test/Example.java
@@ -17,9 +17,14 @@ public class Example {
public static void main(String[] args) throws IOException {
+ long startTime = System.currentTimeMillis();
// 本地模式,速度很快
parseZip("/Users/chris/tmp/test.zip");
+ long startTime2 = System.currentTimeMillis();
+
+ long localProcessTime = startTime2 - startTime;
+
// swfs读取,慢
SeaweedInputStream seaweedInputStream = new SeaweedInputStream(
filerGrpcClient,
@@ -29,6 +34,11 @@ public class Example {
);
parseZip(seaweedInputStream);
+ long swProcessTime = System.currentTimeMillis() - startTime2;
+
+ System.out.println("Local time: " + localProcessTime);
+ System.out.println("SeaweedFS time: " + swProcessTime);
+
}
public static void parseZip(String filename) throws IOException {