fixes stopped printing meta info in scan
@@ -90,10 +90,7 @@ public class ScanUtil {
}
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 class ScanUtil {
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 class ScanUtil {
System.out.println(entry);
}
} catch (Exception e) {
- System.out.println("Scan failed - " + e.getMessage());
+ System.err.println("Scan failed - " + e.getMessage());
+ System.exit(-1);
}
}
