Examples of toThrift()


Examples of org.apache.accumulo.core.data.KeyExtent.toThrift()

          Map<TKeyExtent,List<TRange>> retFailures = Translator.translate(failures, Translator.KET, new Translator.ListTranslator<Range,TRange>(Translator.RT));
          List<TKeyExtent> retFullScans = Translator.translate(fullScans, Translator.KET);
          TKeyExtent retPartScan = null;
          TKey retPartNextKey = null;
          if (partScan != null) {
            retPartScan = partScan.toThrift();
            retPartNextKey = partNextKey.toThrift();
          }
          // add results to queue
          addResult(new MultiScanResult(retResults, retFailures, retFullScans, retPartScan, retPartNextKey, partNextKeyInclusive, session.queries.size() != 0));
        } catch (IterationInterruptedException iie) {
View Full Code Here

Examples of org.apache.accumulo.core.data.KeyExtent.toThrift()

      for (Entry<KeyExtent,Tablet> entry : onlineTabletsCopy.tailMap(start).entrySet()) {
        KeyExtent ke = entry.getKey();
        if (ke.getTableId().compareTo(text) == 0) {
          Tablet tablet = entry.getValue();
          TabletStats stats = tablet.timer.getTabletStats();
          stats.extent = ke.toThrift();
          stats.ingestRate = tablet.ingestRate();
          stats.queryRate = tablet.queryRate();
          stats.splitCreationTime = tablet.getSplitCreationTime();
          stats.numEntries = tablet.getNumEntries();
          result.add(stats);
View Full Code Here

Examples of org.apache.accumulo.core.data.KeyExtent.toThrift()

 
  @Test
  public void testDefineTablet() throws Exception {
    LogFile logFile = writer.create(null, CREDENTIALS, "");
    KeyExtent ke = new KeyExtent(new Text("table1"), new Text("zzzz"), new Text("aaaaa"));
    writer.defineTablet(null, logFile.id, 6, 31, ke.toThrift());
    writer.close(null, logFile.id);
    SequenceFile.Reader dis = readOpen(logFile);
    LogFileKey key = new LogFileKey();
    LogFileValue value = new LogFileValue();
    assertTrue(dis.next(key, value));
View Full Code Here

Examples of org.apache.accumulo.core.data.KeyExtent.toThrift()

          Map<TKeyExtent,List<TRange>> retFailures = Translator.translate(failures, Translator.KET, new Translator.ListTranslator<Range,TRange>(Translator.RT));
          List<TKeyExtent> retFullScans = Translator.translate(fullScans, Translator.KET);
          TKeyExtent retPartScan = null;
          TKey retPartNextKey = null;
          if (partScan != null) {
            retPartScan = partScan.toThrift();
            retPartNextKey = partNextKey.toThrift();
          }
          // add results to queue
          addResult(new MultiScanResult(retResults, retFailures, retFullScans, retPartScan, retPartNextKey, partNextKeyInclusive, session.queries.size() != 0));
        } catch (IterationInterruptedException iie) {
View Full Code Here

Examples of org.apache.accumulo.core.data.KeyExtent.toThrift()

      for (Entry<KeyExtent,Tablet> entry : onlineTabletsCopy.tailMap(start).entrySet()) {
        KeyExtent ke = entry.getKey();
        if (ke.getTableId().compareTo(text) == 0) {
          Tablet tablet = entry.getValue();
          TabletStats stats = tablet.timer.getTabletStats();
          stats.extent = ke.toThrift();
          stats.ingestRate = tablet.ingestRate();
          stats.queryRate = tablet.queryRate();
          stats.splitCreationTime = tablet.getSplitCreationTime();
          stats.numEntries = tablet.getNumEntries();
          result.add(stats);
View Full Code Here

Examples of org.apache.accumulo.core.data.Mutation.toThrift()

              long size = 0;
              Iterator<Mutation> iter = entry.getValue().iterator();
              while (iter.hasNext()) {
                while (size < MUTATION_BATCH_SIZE && iter.hasNext()) {
                  Mutation mutation = iter.next();
                  updates.add(mutation.toThrift());
                  size += mutation.numBytes();
                }
               
                client.applyUpdates(tinfo, usid, entry.getKey().toThrift(), updates);
                updates.clear();
View Full Code Here

Examples of org.apache.accumulo.core.data.Mutation.toThrift()

            long size = 0;
            Iterator<Mutation> iter = entry.getValue().iterator();
            while (iter.hasNext()) {
              while (size < MUTATION_BATCH_SIZE && iter.hasNext()) {
                Mutation mutation = iter.next();
                updates.add(mutation.toThrift());
                size += mutation.numBytes();
              }
             
              client.applyUpdates(null, usid, entry.getKey().toThrift(), updates);
              updates.clear();
View Full Code Here

Examples of org.apache.accumulo.core.data.Mutation.toThrift()

    try {
      TabletClientService.Iface client = ThriftUtil.getTServerClient(opts.location, conf.getConfiguration());
     
      Mutation mutation = new Mutation(new Text("row_0003750001"));
      mutation.putDelete(new Text("colf"), new Text("colq"));
      client.update(Tracer.traceInfo(), CredentialHelper.create(opts.principal, opts.getToken(), opts.instance), new KeyExtent(new Text("!!"), null, new Text("row_0003750000")).toThrift(), mutation.toThrift());
    } catch (Exception e) {
      throw new RuntimeException(e);
    }
  }
}
View Full Code Here

Examples of org.apache.accumulo.core.data.Mutation.toThrift()

            long size = 0;
            Iterator<Mutation> iter = entry.getValue().iterator();
            while (iter.hasNext()) {
              while (size < MUTATION_BATCH_SIZE && iter.hasNext()) {
                Mutation mutation = iter.next();
                updates.add(mutation.toThrift());
                size += mutation.numBytes();
              }
             
              client.applyUpdates(null, usid, entry.getKey().toThrift(), updates);
              updates.clear();
View Full Code Here

Examples of org.apache.accumulo.core.data.Mutation.toThrift()

      TabletClientService.Iface client = ThriftUtil.getTServerClient(location, ServerConfiguration.getSystemConfiguration());
     
      Mutation mutation = new Mutation(new Text("row_0003750001"));
      // mutation.set(new Text("colf:colq"), new Value("val".getBytes()));
      mutation.putDelete(new Text("colf"), new Text("colq"));
      client.update(null, rootCredentials, new KeyExtent(new Text("test_ingest"), null, new Text("row_0003750000")).toThrift(), mutation.toThrift());
    } catch (Exception e) {
      throw new RuntimeException(e);
    }
  }
}
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.