drill-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j...@apache.org
Subject [2/9] drill git commit: DRILL-1971: Mongo Storage Plugin slowness issue
Date Fri, 27 Feb 2015 08:01:56 GMT
DRILL-1971: Mongo Storage Plugin slowness issue


Project: http://git-wip-us.apache.org/repos/asf/drill/repo
Commit: http://git-wip-us.apache.org/repos/asf/drill/commit/619c2fbd
Tree: http://git-wip-us.apache.org/repos/asf/drill/tree/619c2fbd
Diff: http://git-wip-us.apache.org/repos/asf/drill/diff/619c2fbd

Branch: refs/heads/master
Commit: 619c2fbd77adbfd2b28bf79ddd44f298f6a210f4
Parents: f378b34
Author: akumarb2010 <akumarb2010@gmail.com>
Authored: Fri Jan 9 20:49:59 2015 +0530
Committer: Jason Altekruse <altekrusejason@gmail.com>
Committed: Thu Feb 26 16:41:03 2015 -0800

----------------------------------------------------------------------
 .../org/apache/drill/exec/store/mongo/MongoRecordReader.java  | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/drill/blob/619c2fbd/contrib/storage-mongo/src/main/java/org/apache/drill/exec/store/mongo/MongoRecordReader.java
----------------------------------------------------------------------
diff --git a/contrib/storage-mongo/src/main/java/org/apache/drill/exec/store/mongo/MongoRecordReader.java
b/contrib/storage-mongo/src/main/java/org/apache/drill/exec/store/mongo/MongoRecordReader.java
index 4b73600..5af63ff 100644
--- a/contrib/storage-mongo/src/main/java/org/apache/drill/exec/store/mongo/MongoRecordReader.java
+++ b/contrib/storage-mongo/src/main/java/org/apache/drill/exec/store/mongo/MongoRecordReader.java
@@ -191,14 +191,13 @@ public class MongoRecordReader extends AbstractRecordReader {
 
     try {
       String errMsg = "Document {} is too big to fit into allocated ValueVector";
-      done: for (; rowCount < TARGET_RECORD_COUNT && cursor.hasNext(); rowCount++)
{
+      for (; rowCount < TARGET_RECORD_COUNT && cursor.hasNext(); rowCount++) {
         writer.setPosition(docCount);
         String doc = cursor.next().toString();
         jsonReader.setSource(doc.getBytes(Charsets.UTF_8));
-        if(jsonReader.write(writer)== JsonReader.ReadState.WRITE_SUCCEED) {
+        if (jsonReader.write(writer) == JsonReader.ReadState.WRITE_SUCCEED) {
           docCount++;
-          break;
-        }else{
+        } else {
           if (docCount == 0) {
             throw new DrillRuntimeException(errMsg);
           }


Mime
View raw message