private TMutation toThrift(boolean serialize) { if (serialize) { this.serialize(); } ByteBuffer data = serializedSnapshot(); TMutation tmutation = new TMutation(ByteBuffer.wrap(row), data, ByteBufferUtil.toByteBuffers(values), entries); if (!this.replicationSources.isEmpty()) { tmutation.setSources(new ArrayList<>(replicationSources)); } return tmutation; }
@Override public void changeUserAuthorizations(final String principal, final Authorizations authorizations) throws AccumuloException, AccumuloSecurityException { checkArgument(principal != null, "principal is null"); checkArgument(authorizations != null, "authorizations is null"); executeVoid(client -> client.changeAuthorizations(Tracer.traceInfo(), context.rpcCreds(), principal, ByteBufferUtil.toByteBuffers(authorizations.getAuthorizations()))); }
private List<TCondition> convertConditions(ConditionalMutation cm, CompressedIterators compressedIters) { List<TCondition> conditions = new ArrayList<>(cm.getConditions().size()); // sort conditions inorder to get better lookup performance. Sort on client side so tserver does // not have to do it. Condition[] ca = cm.getConditions().toArray(new Condition[cm.getConditions().size()]); Arrays.sort(ca, CONDITION_COMPARATOR); for (Condition cond : ca) { long ts = 0; boolean hasTs = false; if (cond.getTimestamp() != null) { ts = cond.getTimestamp(); hasTs = true; } ByteBuffer iters = compressedIters.compress(cond.getIterators()); TCondition tc = new TCondition(ByteBufferUtil.toByteBuffers(cond.getFamily()), ByteBufferUtil.toByteBuffers(cond.getQualifier()), ByteBufferUtil.toByteBuffers(cond.getVisibility()), ts, hasTs, ByteBufferUtil.toByteBuffers(cond.getValue()), iters); conditions.add(tc); } return conditions; }
ByteBufferUtil.toByteBuffers(auths.getAuthorizations()), tableId.canonicalID(), DurabilityImpl.toThrift(durability), this.classLoaderContext);
thriftTabletRanges, Translator.translate(columns, Translators.CT), options.serverSideIteratorList, options.serverSideIteratorOptions, ByteBufferUtil.toByteBuffers(authorizations.getAuthorizations()), waitForWrites, SamplerConfigurationImpl.toThrift(options.getSamplerConfiguration()), options.batchTimeOut, options.classLoaderContext, execHints);
private TMutation toThrift(boolean serialize) { if (serialize) { this.serialize(); } ByteBuffer data = serializedSnapshot(); TMutation tmutation = new TMutation(ByteBuffer.wrap(row), data, ByteBufferUtil.toByteBuffers(values), entries); if (!this.replicationSources.isEmpty()) { tmutation.setSources(new ArrayList<>(replicationSources)); } return tmutation; }
private List<TCondition> convertConditions(ConditionalMutation cm, CompressedIterators compressedIters) { List<TCondition> conditions = new ArrayList<>(cm.getConditions().size()); // sort conditions inorder to get better lookup performance. Sort on client side so tserver does // not have to do it. Condition[] ca = cm.getConditions().toArray(new Condition[cm.getConditions().size()]); Arrays.sort(ca, CONDITION_COMPARATOR); for (Condition cond : ca) { long ts = 0; boolean hasTs = false; if (cond.getTimestamp() != null) { ts = cond.getTimestamp(); hasTs = true; } ByteBuffer iters = compressedIters.compress(cond.getIterators()); TCondition tc = new TCondition(ByteBufferUtil.toByteBuffers(cond.getFamily()), ByteBufferUtil.toByteBuffers(cond.getQualifier()), ByteBufferUtil.toByteBuffers(cond.getVisibility()), ts, hasTs, ByteBufferUtil.toByteBuffers(cond.getValue()), iters); conditions.add(tc); } return conditions; }
ByteBufferUtil.toByteBuffers(auths.getAuthorizations()), tableId, DurabilityImpl.toThrift(durability), this.classLoaderContext);
@Override public void execute(ClientService.Client client) throws Exception { client.changeAuthorizations(Tracer.traceInfo(), context.rpcCreds(), principal, ByteBufferUtil.toByteBuffers(authorizations.getAuthorizations())); } });
thriftTabletRanges, Translator.translate(columns, Translators.CT), options.serverSideIteratorList, options.serverSideIteratorOptions, ByteBufferUtil.toByteBuffers(authorizations.getAuthorizations()), waitForWrites, SamplerConfigurationImpl.toThrift(options.getSamplerConfiguration()), options.batchTimeOut, options.classLoaderContext);