Esempio n. 1
0
 public static Scan newScan(Scan scan) {
   try {
     Scan newScan = new Scan(scan);
     // Clone the underlying family map instead of sharing it between
     // the existing and cloned Scan (which is the retarded default
     // behavior).
     TreeMap<byte[], NavigableSet<byte[]>> existingMap =
         (TreeMap<byte[], NavigableSet<byte[]>>) scan.getFamilyMap();
     Map<byte[], NavigableSet<byte[]>> clonedMap =
         new TreeMap<byte[], NavigableSet<byte[]>>(existingMap);
     newScan.setFamilyMap(clonedMap);
     // Carry over the reversed attribute
     newScan.setReversed(scan.isReversed());
     newScan.setSmall(scan.isSmall());
     return newScan;
   } catch (IOException e) {
     throw new RuntimeException(e);
   }
 }
 public ResultScanner getScanner(Scan scan, float DOPparallelScanner) throws IOException {
   if (scan.isSmall() || DOPparallelScanner == 0) return super.getScanner(scan);
   else return new TrafParallelClientScanner(this.connection, scan, getName(), DOPparallelScanner);
 }