drill-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From paul-rogers <...@git.apache.org>
Subject [GitHub] drill pull request #702: DRILL-5088: set default codec for toJson
Date Fri, 03 Feb 2017 18:43:47 GMT
Github user paul-rogers commented on a diff in the pull request:

    https://github.com/apache/drill/pull/702#discussion_r99396951
  
    --- Diff: contrib/storage-mongo/src/test/java/org/apache/drill/exec/store/mongo/TestTableGenerator.java
---
    @@ -58,7 +59,16 @@ public static void generateTable(String dbName, String collection,
             .jsonArray(jsonArray).importFile(jsonFile).build();
         MongoImportExecutable importExecutable = MongoImportStarter
             .getDefaultInstance().prepare(mongoImportConfig);
    -    importExecutable.start();
    +    MongoImportProcess importProcess = importExecutable.start();
    +
    +    try {
    +      while (importProcess.isProcessRunning()) {
    +        Thread.sleep(1000);
    +      }
    +    }catch (Exception ex) {
    +      logger.error("Import mongoDb failed", ex);
    --- End diff --
    
    Here we log the error but go ahead and return. Should we propagate an exception upward
in the call stack so that the caller knows that "Something Is Wrong"? Otherwise, how will
the caller know whether the import process is ready or not?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message