You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by ch...@apache.org on 2015/03/05 17:35:21 UTC
airavata git commit: fixing compilation issue
Repository: airavata
Updated Branches:
refs/heads/master 38e7309ff -> a18b747a5
fixing compilation issue
Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/a18b747a
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/a18b747a
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/a18b747a
Branch: refs/heads/master
Commit: a18b747a54df31fd74709a4386638544edc4863b
Parents: 38e7309
Author: Chathuri Wimalasena <ka...@gmail.com>
Authored: Thu Mar 5 11:35:16 2015 -0500
Committer: Chathuri Wimalasena <ka...@gmail.com>
Committed: Thu Mar 5 11:35:16 2015 -0500
----------------------------------------------------------------------
.../airavata/messaging/client/TestReader.java | 85 ++++++++++----------
1 file changed, 41 insertions(+), 44 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/airavata/blob/a18b747a/modules/messaging/client/src/main/java/org/apache/airavata/messaging/client/TestReader.java
----------------------------------------------------------------------
diff --git a/modules/messaging/client/src/main/java/org/apache/airavata/messaging/client/TestReader.java b/modules/messaging/client/src/main/java/org/apache/airavata/messaging/client/TestReader.java
index cf4e7f4..4ddbf42 100644
--- a/modules/messaging/client/src/main/java/org/apache/airavata/messaging/client/TestReader.java
+++ b/modules/messaging/client/src/main/java/org/apache/airavata/messaging/client/TestReader.java
@@ -3,51 +3,48 @@ package org.apache.airavata.messaging.client;
import java.io.*;
import java.util.ArrayList;
import java.util.List;
-import java.util.stream.Stream;
+//import java.util.stream.Stream;
public class TestReader {
- public static void main(String[] args) throws IOException {
- String fileName = "/Users/chathuri/dev/airavata/docs/messaging_framework/gw111/results_350";
- File file = new File("/Users/chathuri/dev/airavata/docs/messaging_framework/gw111/processed/results_350");
- BufferedReader br = null;
- List<Long> count = new ArrayList<Long>();
- FileOutputStream fos;
- BufferedWriter bw;
- try {
- br = new BufferedReader(new FileReader(fileName));
-// String line = br.readLine();
- Stream<String> lines = br.lines();
- Object[] objects = lines.toArray();
- for (int i = 0; i < objects.length; i++){
- String line = (String)objects[i];
- if (line.contains(":")){
- String[] split = line.split(":");
- count.add(Long.valueOf(split[1]));
- }
- }
- fos = new FileOutputStream(file, false);
- bw = new BufferedWriter(new OutputStreamWriter(fos));
- long allCount = 0;
- for (int i = 0; i < count.size(); i++) {
- if (i % 10 != 9){
- allCount += count.get(i);
- }else {
- bw.write(String.valueOf(i + 1) + " :" + String.valueOf(allCount));
- bw.newLine();
- allCount = 0;
- }
- }
- bw.flush();
- } catch (FileNotFoundException e) {
- e.printStackTrace();
- } catch (IOException e) {
- e.printStackTrace();
- } finally {
- br.close();
- }
- }
-
-
-
+// public static void main(String[] args) throws IOException {
+// String fileName = "/Users/chathuri/dev/airavata/docs/messaging_framework/gw111/results_350";
+// File file = new File("/Users/chathuri/dev/airavata/docs/messaging_framework/gw111/processed/results_350");
+// BufferedReader br = null;
+// List<Long> count = new ArrayList<Long>();
+// FileOutputStream fos;
+// BufferedWriter bw;
+// try {
+// br = new BufferedReader(new FileReader(fileName));
+//// String line = br.readLine();
+// Stream<String> lines = br.lines();
+// Object[] objects = lines.toArray();
+// for (int i = 0; i < objects.length; i++){
+// String line = (String)objects[i];
+// if (line.contains(":")){
+// String[] split = line.split(":");
+// count.add(Long.valueOf(split[1]));
+// }
+// }
+// fos = new FileOutputStream(file, false);
+// bw = new BufferedWriter(new OutputStreamWriter(fos));
+// long allCount = 0;
+// for (int i = 0; i < count.size(); i++) {
+// if (i % 10 != 9){
+// allCount += count.get(i);
+// }else {
+// bw.write(String.valueOf(i + 1) + " :" + String.valueOf(allCount));
+// bw.newLine();
+// allCount = 0;
+// }
+// }
+// bw.flush();
+// } catch (FileNotFoundException e) {
+// e.printStackTrace();
+// } catch (IOException e) {
+// e.printStackTrace();
+// } finally {
+// br.close();
+// }
+// }
}