Package org.apache.accumulo.proxy.thrift

Examples of org.apache.accumulo.proxy.thrift.WriterOptions


    try {
      client.createScanner(creds, doesNotExist, new ScanOptions());
      fail("exception not thrown");
    } catch (TableNotFoundException ex) {}
    try {
      client.createWriter(creds, doesNotExist, new WriterOptions());
      fail("exception not thrown");
    } catch (TableNotFoundException ex) {}
    try {
      client.deleteRows(creds, doesNotExist, null, null);
      fail("exception not thrown");
View Full Code Here


      client.deleteTable(creds, TABLE_TEST);
   
    client.createTable(creds, TABLE_TEST, true, TimeType.MILLIS);
    client.addConstraint(creds, TABLE_TEST, NumericValueConstraint.class.getName());
   
    WriterOptions writerOptions = new WriterOptions();
    writerOptions.setLatencyMs(10000);
    writerOptions.setMaxMemory(2);
    writerOptions.setThreads(1);
    writerOptions.setTimeoutMs(100000);
   
    String batchWriter = client.createWriter(creds, TABLE_TEST, writerOptions);
    client.update(batchWriter, mutation("row1", "cf", "cq", "x"));
    client.update(batchWriter, mutation("row1", "cf", "cq", "x"));
    try {
      client.flush(batchWriter);
      fail("constraint did not fire");
    } catch (MutationsRejectedException ex) {}
    try {
      client.closeWriter(batchWriter);
      fail("constraint did not fire");
    } catch (MutationsRejectedException e) {}
   
    client.removeConstraint(creds, TABLE_TEST, 1);
   
    writerOptions = new WriterOptions();
    writerOptions.setLatencyMs(10000);
    writerOptions.setMaxMemory(3000);
    writerOptions.setThreads(1);
    writerOptions.setTimeoutMs(100000);
   
    batchWriter = client.createWriter(creds, TABLE_TEST, writerOptions);
   
    client.update(batchWriter, mutation("row1", "cf", "cq", "x"));
    client.flush(batchWriter);
View Full Code Here

    try {
      client.updateAndFlush(badLogin, table, new HashMap<ByteBuffer,List<ColumnUpdate>>());
      fail("exception not thrown");
    } catch (AccumuloSecurityException ex) {}
    try {
      client.createWriter(badLogin, table, new WriterOptions());
      fail("exception not thrown");
    } catch (AccumuloSecurityException ex) {}
    try {
      client.attachIterator(badLogin, "slow", setting, EnumSet.allOf(IteratorScope.class));
      fail("exception not thrown");
View Full Code Here

    try {
      client.createScanner(creds, doesNotExist, new ScanOptions());
      fail("exception not thrown");
    } catch (TableNotFoundException ex) {}
    try {
      client.createWriter(creds, doesNotExist, new WriterOptions());
      fail("exception not thrown");
    } catch (TableNotFoundException ex) {}
    try {
      client.deleteRows(creds, doesNotExist, null, null);
      fail("exception not thrown");
View Full Code Here

      client.deleteTable(creds, TABLE_TEST);
   
    client.createTable(creds, TABLE_TEST, true, TimeType.MILLIS);
    client.addConstraint(creds, TABLE_TEST, NumericValueConstraint.class.getName());
   
    WriterOptions writerOptions = new WriterOptions();
    writerOptions.setLatencyMs(10000);
    writerOptions.setMaxMemory(2);
    writerOptions.setThreads(1);
    writerOptions.setTimeoutMs(100000);
   
    String batchWriter = client.createWriter(creds, TABLE_TEST, writerOptions);
    client.update(batchWriter, mutation("row1", "cf", "cq", "x"));
    client.update(batchWriter, mutation("row1", "cf", "cq", "x"));
    try {
      client.flush(batchWriter);
      fail("constraint did not fire");
    } catch (MutationsRejectedException ex) {}
    try {
      client.closeWriter(batchWriter);
      fail("constraint did not fire");
    } catch (MutationsRejectedException e) {}
   
    client.removeConstraint(creds, TABLE_TEST, 1);

    UtilWaitThread.sleep(2000);
   
    writerOptions = new WriterOptions();
    writerOptions.setLatencyMs(10000);
    writerOptions.setMaxMemory(3000);
    writerOptions.setThreads(1);
    writerOptions.setTimeoutMs(100000);
   
    batchWriter = client.createWriter(creds, TABLE_TEST, writerOptions);
   
    client.update(batchWriter, mutation("row1", "cf", "cq", "x"));
    client.flush(batchWriter);
View Full Code Here

    try {
      client.updateAndFlush(badLogin, table, new HashMap<ByteBuffer,List<ColumnUpdate>>());
      fail("exception not thrown");
    } catch (AccumuloSecurityException ex) {}
    try {
      client.createWriter(badLogin, table, new WriterOptions());
      fail("exception not thrown");
    } catch (AccumuloSecurityException ex) {}
    try {
      client.attachIterator(badLogin, "slow", setting, EnumSet.allOf(IteratorScope.class));
      fail("exception not thrown");
View Full Code Here

    try {
      client.createScanner(creds, doesNotExist, new ScanOptions());
      fail("exception not thrown");
    } catch (TableNotFoundException ex) {}
    try {
      client.createWriter(creds, doesNotExist, new WriterOptions());
      fail("exception not thrown");
    } catch (TableNotFoundException ex) {}
    try {
      client.deleteRows(creds, doesNotExist, null, null);
      fail("exception not thrown");
View Full Code Here

    final String TABLE_TEST = makeTableName();

    client.createTable(creds, TABLE_TEST, true, TimeType.MILLIS);
    client.addConstraint(creds, TABLE_TEST, NumericValueConstraint.class.getName());

    WriterOptions writerOptions = new WriterOptions();
    writerOptions.setLatencyMs(10000);
    writerOptions.setMaxMemory(2);
    writerOptions.setThreads(1);
    writerOptions.setTimeoutMs(100000);

    String batchWriter = client.createWriter(creds, TABLE_TEST, writerOptions);
    client.update(batchWriter, mutation("row1", "cf", "cq", "x"));
    client.update(batchWriter, mutation("row1", "cf", "cq", "x"));
    try {
      client.flush(batchWriter);
      fail("constraint did not fire");
    } catch (MutationsRejectedException ex) {}
    try {
      client.closeWriter(batchWriter);
      fail("constraint did not fire");
    } catch (MutationsRejectedException e) {}

    client.removeConstraint(creds, TABLE_TEST, 2);

    assertScan(new String[][] {}, TABLE_TEST);

    UtilWaitThread.sleep(2000);
   
    writerOptions = new WriterOptions();
    writerOptions.setLatencyMs(10000);
    writerOptions.setMaxMemory(3000);
    writerOptions.setThreads(1);
    writerOptions.setTimeoutMs(100000);

    batchWriter = client.createWriter(creds, TABLE_TEST, writerOptions);

    client.update(batchWriter, mutation("row1", "cf", "cq", "x"));
    client.flush(batchWriter);
View Full Code Here

TOP

Related Classes of org.apache.accumulo.proxy.thrift.WriterOptions

Copyright © 2018 www.massapicom. 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.