keith-turner closed pull request #982: fixes #981 stopped printing meta info in 
scan
URL: https://github.com/apache/fluo/pull/982
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/modules/core/src/main/java/org/apache/fluo/core/util/ScanUtil.java 
b/modules/core/src/main/java/org/apache/fluo/core/util/ScanUtil.java
index d5451956..46aacca8 100644
--- a/modules/core/src/main/java/org/apache/fluo/core/util/ScanUtil.java
+++ b/modules/core/src/main/java/org/apache/fluo/core/util/ScanUtil.java
@@ -4,9 +4,9 @@
  * copyright ownership. The ASF licenses this file to you under the Apache 
License, Version 2.0 (the
  * "License"); you may not use this file except in compliance with the 
License. You may obtain a
  * copy of the License at
- * 
+ *
  * http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software 
distributed under the License
  * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 
KIND, either express
  * or implied. See the License for the specific language governing permissions 
and limitations under
@@ -90,10 +90,7 @@ public static Span getSpan(ScanOpts options) {
   }
 
   public static void scanFluo(ScanOpts options, FluoConfiguration sConfig) {
-    System.out.println(
-        "Scanning snapshot of data in Fluo '" + sConfig.getApplicationName() + 
"' application.");
 
-    long entriesFound = 0;
     try (FluoClient client = FluoFactory.newClient(sConfig)) {
       try (Snapshot s = client.newSnapshot()) {
 
@@ -128,24 +125,20 @@ public static void scanFluo(ScanOpts options, 
FluoConfiguration sConfig) {
             sb.append(rcv.getsValue());
             System.out.println(sb.toString());
           }
-          entriesFound++;
+
           if (System.out.checkError()) {
             break;
           }
         }
 
-        if (entriesFound == 0) {
-          System.out.println("\nNo data found\n");
-        }
       } catch (FluoException e) {
-        System.out.println("Scan failed - " + e.getMessage());
+        System.err.println("Scan failed - " + e.getMessage());
+        System.exit(-1);
       }
     }
   }
 
   public static void scanAccumulo(ScanOpts options, FluoConfiguration sConfig) 
{
-    System.out.println("Scanning data in Accumulo directly for '" + 
sConfig.getApplicationName()
-        + "' application.");
 
     Connector conn = AccumuloUtil.getConnector(sConfig);
 
@@ -175,7 +168,8 @@ public static void scanAccumulo(ScanOpts options, 
FluoConfiguration sConfig) {
         System.out.println(entry);
       }
     } catch (Exception e) {
-      System.out.println("Scan failed - " + e.getMessage());
+      System.err.println("Scan failed - " + e.getMessage());
+      System.exit(-1);
     }
   }
 


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to