Examples of ZooKeeperInstance


Examples of org.apache.accumulo.core.client.ZooKeeperInstance

    }
  }

  @Test
  public void testTableRenameNewWriters() throws Exception {
    ZooKeeperInstance instance = new ZooKeeperInstance(cluster.getInstanceName(), cluster.getZooKeepers());
    Connector connector = instance.getConnector("root", password);

    BatchWriterConfig config = new BatchWriterConfig();

    TCredentials creds = CredentialHelper.create("root", password, instance.getInstanceID());
    MultiTableBatchWriter mtbw = new MultiTableBatchWriterImpl(instance, creds, config, 60, TimeUnit.SECONDS);

    try {
      final String table1 = "testTableRenameNewWriters_table1", table2 = "testTableRenameNewWriters_table2";
      final String newTable1 = "testTableRenameNewWriters_newTable1", newTable2 = "testTableRenameNewWriters_newTable2";
View Full Code Here

Examples of org.apache.accumulo.core.client.ZooKeeperInstance

    }
  }

  @Test
  public void testTableRenameNewWritersNoCaching() throws Exception {
    ZooKeeperInstance instance = new ZooKeeperInstance(cluster.getInstanceName(), cluster.getZooKeepers());
    Connector connector = instance.getConnector("root", password);

    BatchWriterConfig config = new BatchWriterConfig();
   
    TCredentials creds = CredentialHelper.create("root", password, instance.getInstanceID());
    MultiTableBatchWriter mtbw = new MultiTableBatchWriterImpl(instance, creds, config, 0, TimeUnit.SECONDS);

    try {
      final String table1 = "testTableRenameNewWritersNoCaching_table1", table2 = "testTableRenameNewWritersNoCaching_table2";
      final String newTable1 = "testTableRenameNewWritersNoCaching_newTable1", newTable2 = "testTableRenameNewWritersNoCaching_newTable2";
View Full Code Here

Examples of org.apache.accumulo.core.client.ZooKeeperInstance

    }
  }

  @Test
  public void testTableDelete() throws Exception {
    ZooKeeperInstance instance = new ZooKeeperInstance(cluster.getInstanceName(), cluster.getZooKeepers());
    Connector connector = instance.getConnector("root", password);

    BatchWriterConfig config = new BatchWriterConfig();

    TCredentials creds = CredentialHelper.create("root", password, instance.getInstanceID());
    MultiTableBatchWriter mtbw = new MultiTableBatchWriterImpl(instance, creds, config, 60, TimeUnit.SECONDS);
    boolean mutationsRejected = false;
   
    try {
      final String table1 = "testTableDelete_table1", table2 = "testTableDelete_table2";
View Full Code Here

Examples of org.apache.accumulo.core.client.ZooKeeperInstance

  }

  @Test
  public void testOfflineTable() throws Exception {

    ZooKeeperInstance instance = new ZooKeeperInstance(cluster.getInstanceName(), cluster.getZooKeepers());
    Connector connector = instance.getConnector("root", password);

    BatchWriterConfig config = new BatchWriterConfig();

    TCredentials creds = CredentialHelper.create("root", password, instance.getInstanceID());
    MultiTableBatchWriter mtbw = new MultiTableBatchWriterImpl(instance, creds, config, 60, TimeUnit.SECONDS);
    boolean mutationsRejected = false;

    try {
      final String table1 = "testOfflineTable_table1", table2 = "testOfflineTable_table2";
View Full Code Here

Examples of org.apache.accumulo.core.client.ZooKeeperInstance

  }

  @Test
  public void testOfflineTableWithCache() throws Exception {

    ZooKeeperInstance instance = new ZooKeeperInstance(cluster.getInstanceName(), cluster.getZooKeepers());
    Connector connector = instance.getConnector("root", password);

    BatchWriterConfig config = new BatchWriterConfig();
   
    TCredentials creds = CredentialHelper.create("root", password, instance.getInstanceID());
    MultiTableBatchWriter mtbw = new MultiTableBatchWriterImpl(instance, creds, config, 60, TimeUnit.SECONDS);
    boolean mutationsRejected = false;

    try {
      final String table1 = "testOfflineTableWithCache_table1", table2 = "testOfflineTableWithCache_table2";
View Full Code Here

Examples of org.apache.accumulo.core.client.ZooKeeperInstance

    folder.delete();
  }

  @Test(timeout = 5 * 60 * 1000)
  public void test() throws Exception {
    ZooKeeperInstance zk = new ZooKeeperInstance(cluster.getInstanceName(), cluster.getZooKeepers());
    Connector c = zk.getConnector("root", new PasswordToken(secret));
    for (int i = 0; i < 20; i++) {
      final String tableName = testName.getMethodName() + i;
      log.debug("Creating " + tableName);
      c.tableOperations().create(tableName);
      log.debug("Deleting rows from " + tableName);
View Full Code Here

Examples of org.apache.accumulo.core.client.ZooKeeperInstance

  @Test(timeout = 120 * 1000)
  public void run() throws Exception {
    String table1 = "clone1";
    String table2 = "clone2";
   
    ZooKeeperInstance zki = new ZooKeeperInstance(accumulo.getInstanceName(), accumulo.getZooKeepers());
    Connector c = zki.getConnector("root", new PasswordToken(secret));
   
    c.tableOperations().create(table1);
   
    c.tableOperations().setProperty(table1, Property.TABLE_FILE_COMPRESSED_BLOCK_SIZE.getKey(), "1M");
    c.tableOperations().setProperty(table1, Property.TABLE_FILE_COMPRESSED_BLOCK_SIZE_INDEX.getKey(), "2M");
View Full Code Here

Examples of org.apache.accumulo.core.client.ZooKeeperInstance

  protected Connector getConnector() throws AccumuloException, AccumuloSecurityException {
    return getInstance().getConnector(getPrincipal(), getToken());
  }
 
  protected Instance getInstance() {
    return new ZooKeeperInstance(getInstanceName(), ServerConfiguration.getSiteConfiguration().get(Property.INSTANCE_ZK_HOST));
  }
View Full Code Here

Examples of org.apache.accumulo.core.client.ZooKeeperInstance

    TServerUtils.startTServer(opts.port, processor, "NullTServer", "null tserver", 2, 1000, 10*1024*1024);
   
    InetSocketAddress addr = new InetSocketAddress(InetAddress.getLocalHost(), opts.port);
   
    // modify !METADATA
    ZooKeeperInstance zki = new ZooKeeperInstance(opts.iname, opts.keepers);
    String tableId = Tables.getTableId(zki, opts.tableName);
   
    // read the locations for the table
    Range tableRange = new KeyExtent(new Text(tableId), null, null).toMetadataRange();
    MetaDataTableScanner s = new MetaDataTableScanner(zki, SecurityConstants.getSystemCredentials(), tableRange);
View Full Code Here

Examples of org.apache.accumulo.core.client.ZooKeeperInstance

    opts.addSplits(Constants.METADATA_TABLE_NAME, splits);
  }
 
  @Test(timeout = 120000)
  public void testMetaSplit() throws Exception {
    Instance instance = new ZooKeeperInstance(cluster.getInstanceName(), cluster.getZooKeepers());
    Connector connector = instance.getConnector("root", new PasswordToken(secret));
    TableOperations opts = connector.tableOperations();
    for (int i = 1; i <= 10; i++) {
      opts.create("" + i);
    }
    opts.merge(Constants.METADATA_TABLE_NAME, new Text("01"), new Text("02"));
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.