|
@ -17,9 +17,14 @@ public class Example { |
|
|
|
|
|
|
|
|
public static void main(String[] args) throws IOException { |
|
|
public static void main(String[] args) throws IOException { |
|
|
|
|
|
|
|
|
|
|
|
long startTime = System.currentTimeMillis(); |
|
|
// 本地模式,速度很快 |
|
|
// 本地模式,速度很快 |
|
|
parseZip("/Users/chris/tmp/test.zip"); |
|
|
parseZip("/Users/chris/tmp/test.zip"); |
|
|
|
|
|
|
|
|
|
|
|
long startTime2 = System.currentTimeMillis(); |
|
|
|
|
|
|
|
|
|
|
|
long localProcessTime = startTime2 - startTime; |
|
|
|
|
|
|
|
|
// swfs读取,慢 |
|
|
// swfs读取,慢 |
|
|
SeaweedInputStream seaweedInputStream = new SeaweedInputStream( |
|
|
SeaweedInputStream seaweedInputStream = new SeaweedInputStream( |
|
|
filerGrpcClient, |
|
|
filerGrpcClient, |
|
@ -29,6 +34,11 @@ public class Example { |
|
|
); |
|
|
); |
|
|
parseZip(seaweedInputStream); |
|
|
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 { |
|
|
public static void parseZip(String filename) throws IOException { |
|
|