Examples of toThrift()


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

    }
    assertTrue(fs.exists(mylog));
    Mutation m = new Mutation(new Text("row1"));
    m.put(new Text("cf"), new Text("cq"), new Value("value".getBytes()));
    try {
      writer.log(null, logFile.id, 1, 0, m.toThrift());
      fail("writing to a log after it has been copied to hdfs should fail");
    } catch (NoSuchLogIDException ex) {
      // ignored
    }
    fs.delete(mylog, true);
View Full Code Here

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

  @Test
  public void testLog() throws Exception {
    LogFile logFile = writer.create(null, CREDENTIALS, "");
    Mutation m = new Mutation(new Text("somerow"));
    m.put(new Text("cf1"), new Text("cq1"), new Value("value1".getBytes()));
    writer.log(null, logFile.id, 2, 42, m.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.Mutation.toThrift()

    LogFile logFile = writer.create(null, CREDENTIALS, "");
    List<TMutation> all = new ArrayList<TMutation>();
    for (int i = 0; i < 10; i++) {
      Mutation m = new Mutation(new Text("somerow"));
      m.put(new Text("cf" + i), new Text("cq" + i), new Value(("value" + i).getBytes()));
      all.add(m.toThrift());
    }
    List<TabletMutations> updates = new ArrayList<TabletMutations>();
    updates.add(new TabletMutations(13, 3, all));
    writer.logManyTablets(null, logFile.id, updates);
    writer.close(null, logFile.id);
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(tinfo, usid, entry.getKey().toThrift(), updates);
                updates.clear();
View Full Code Here

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

       
        row.getBytes()[row.getLength() - 1] = (byte) (row.getBytes()[row.getLength() - 1] - 1);
      }
     
      Range r = new Range(row, true, row2, false);
      batch.put(keyExtent.toThrift(), Collections.singletonList(r.toThrift()));
    }
    TInfo tinfo = Tracer.traceInfo();
    Map<String,Map<String,String>> emptyMapSMapSS = Collections.emptyMap();
    List<IterInfo> emptyListIterInfo = Collections.emptyList();
    List<TColumn> emptyListColumn = Collections.emptyList();
View Full Code Here

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

       
        row.getBytes()[row.getLength() - 1] = (byte) (row.getBytes()[row.getLength() - 1] - 1);
      }
     
      Range r = new Range(row, true, row2, false);
      batch.put(keyExtent.toThrift(), Collections.singletonList(r.toThrift()));
    }
   
    Map<String,Map<String,String>> emptyMapSMapSS = Collections.emptyMap();
    List<IterInfo> emptyListIterInfo = Collections.emptyList();
    List<TColumn> emptyListColumn = Collections.emptyList();
View Full Code Here

Examples of org.apache.accumulo.core.security.Credentials.toThrift()

    int unassignedTablets = 1;
    for (int i = 0; unassignedTablets > 0 && i < 10; i++) {
      MasterClientService.Iface client = null;
      try {
        client = MasterClient.getConnectionWithRetry(c.getInstance());
        stats = client.getMasterStats(Tracer.traceInfo(), creds.toThrift(c.getInstance()));
      } finally {
        if (client != null)
          MasterClient.close(client);
      }
      unassignedTablets = stats.getUnassignedTablets();
View Full Code Here

Examples of org.apache.accumulo.core.security.Credentials.toThrift()

    int unassignedTablets = 1;
    for (int i = 0; unassignedTablets > 0 && i < 10; i++) {
      MasterClientService.Iface client = null;
      try {
        client = MasterClient.getConnectionWithRetry(c.getInstance());
        stats = client.getMasterStats(Tracer.traceInfo(), creds.toThrift(c.getInstance()));
      } finally {
        if (client != null)
          MasterClient.close(client);
      }
      unassignedTablets = stats.getUnassignedTablets();
View Full Code Here

Examples of org.apache.cassandra.config.CFMetaData.toThrift()

        {
            CFMetaData oldCfm = ThriftValidation.validateColumnFamily(keyspace(), columnFamily());
            boolean columnExists = false;
            // mutating oldCfm directly would be bad, but mutating a Thrift copy is fine.  This also
            // sets us up to use validateCfDef to check for index name collisions.
            CfDef cf_def = oldCfm.toThrift();
            for (ColumnDef cd : cf_def.column_metadata)
            {
                if (cd.name.equals(columnName.key))
                {
                    if (cd.index_type != null)
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.