Examples of addMutation()


Examples of org.apache.accumulo.core.client.BatchWriter.addMutation()

      final Text emptyText = new Text("");
      Text row = new Text(String.format("%s/%020d/%s", Constants.METADATA_DELETE_FLAG_PREFIX, i,
          "aaaaaaaaaabbbbbbbbbbccccccccccddddddddddeeeeeeeeeeffffffffffgggggggggghhhhhhhhhhiiiiiiiiiijjjjjjjjjj"));
      Mutation delFlag = new Mutation(row);
      delFlag.put(emptyText, emptyText, new Value(new byte[] {}));
      bw.addMutation(delFlag);
    }
    bw.close();
  }
}
View Full Code Here

Examples of org.apache.accumulo.core.client.BatchWriter.addMutation()

    }
  }
 
  private static void update(Connector c, Mutation m) throws TableNotFoundException, MutationsRejectedException {
    BatchWriter bw = c.createBatchWriter(Constants.METADATA_TABLE_NAME, new BatchWriterConfig());
    bw.addMutation(m);
    bw.close();
  }
 
  @Test
  public void test() throws Exception {
View Full Code Here

Examples of org.apache.accumulo.core.client.BatchWriter.addMutation()

    for (String s : splits) {
      Text split = new Text(s);
      Mutation prevRow = KeyExtent.getPrevRowUpdateMutation(new KeyExtent(tableId, split, pr));
      prevRow.put(Constants.METADATA_CURRENT_LOCATION_COLUMN_FAMILY, new Text("123456"), new Value("127.0.0.1:1234".getBytes()));
      Constants.METADATA_CHOPPED_COLUMN.put(prevRow, new Value("junk".getBytes()));
      bw.addMutation(prevRow);
      pr = split;
    }
    // Add the default tablet
    Mutation defaultTablet = KeyExtent.getPrevRowUpdateMutation(new KeyExtent(tableId, null, pr));
    defaultTablet.put(Constants.METADATA_CURRENT_LOCATION_COLUMN_FAMILY, new Text("123456"), new Value("127.0.0.1:1234".getBytes()));
View Full Code Here

Examples of org.apache.accumulo.core.client.BatchWriter.addMutation()

      pr = split;
    }
    // Add the default tablet
    Mutation defaultTablet = KeyExtent.getPrevRowUpdateMutation(new KeyExtent(tableId, null, pr));
    defaultTablet.put(Constants.METADATA_CURRENT_LOCATION_COLUMN_FAMILY, new Text("123456"), new Value("127.0.0.1:1234".getBytes()));
    bw.addMutation(defaultTablet);
    bw.close();
   
    // Read out the TabletLocationStates
    MockCurrentState state = new MockCurrentState(new MergeInfo(new KeyExtent(tableId, new Text("p"), new Text("e")), MergeInfo.Operation.MERGE));
    TCredentials auths = CredentialHelper.create("root", new PasswordToken(new byte[0]), "instance");
View Full Code Here

Examples of org.apache.accumulo.core.client.BatchWriter.addMutation()

    conn.tableOperations().create(table);
    BatchWriter bw = conn.createBatchWriter(table, new BatchWriterConfig());
    Mutation m = new Mutation(ball);
    m.put(new byte[0], new byte[0], new byte[0]);
    bw.addMutation(m);
    bw.close();

    IteratorSetting is = new IteratorSetting(5, RegExFilter.class);
    RegExFilter.setRegexs(is, s2, null, null, null, true, true);
View Full Code Here

Examples of org.apache.accumulo.core.client.BatchWriter.addMutation()

          if (delete) {
            m.putDelete(CF, CQ);
          } else {
            m.put(CF, CQ, new Value(value.getBytes(Constants.UTF8)));
          }
          bw.addMutation(m);
        }
       
        bw.close();
      } else if (opts.mode.equals("verifyDeleted")) {
        Scanner s = connector.createScanner(opts.tableName, opts.auths);
View Full Code Here

Examples of org.apache.accumulo.core.client.BatchWriter.addMutation()

     
      // populate
      for (int i = 0; i < opts.count; i++) {
        Mutation m = new Mutation(new Text(String.format("%05d", i)));
        m.put(new Text("col" + Integer.toString((i % 3) + 1)), new Text("qual"), new Value("junk".getBytes(Constants.UTF8)));
        b.addMutation(m);
      }
      b.close();
    }
   
    readBack(connector, opts, scanOpts);
View Full Code Here

Examples of org.apache.accumulo.core.client.BatchWriter.addMutation()

            m.put(createCF(j), createCQ(k), t, new Value(String.format("%06d_%03d_%03d_%03d", i, j, k, t).getBytes(Constants.UTF8)));
          }
        }
      }
     
      bw.addMutation(m);
    }
   
    bw.close();
  }
}
View Full Code Here

Examples of org.apache.accumulo.core.client.BatchWriter.addMutation()

    mput(m1, "cf1", "cq1", "A&FOO&(L|M)", "v10");
    mput(m1, "cf1", "cq1", "FOO", "v11");
    mput(m1, "cf1", "cq1", "(A|B)&FOO&(L|M)", "v12");
    mput(m1, "cf1", "cq1", "A&B&(L|M|FOO)", "v13");
   
    bw.addMutation(m1);
    bw.close();
  }
 
  private void deleteData() throws Exception {
   
View Full Code Here

Examples of org.apache.accumulo.core.client.BatchWriter.addMutation()

    mputDelete(m1, "cf1", "cq1", "A&B&(L)");
    mputDelete(m1, "cf1", "cq1", "A&FOO&(L|M)");
    mputDelete(m1, "cf1", "cq1", "(A|B)&FOO&(L|M)");
    mputDelete(m1, "cf1", "cq1", "FOO&A"); // should not delete anything
   
    bw.addMutation(m1);
    bw.close();
   
    Map<Set<String>,Set<String>> expected = new HashMap<Set<String>,Set<String>>();
   
    expected.put(nss("A", "L"), nss("v5"));
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.