@Override public ColumnOrSuperColumn get(TableReference tableReference, ByteBuffer key, byte[] column, ConsistencyLevel consistency_level) throws InvalidRequestException, NotFoundException, UnavailableException, TimedOutException, TException { return executeRead( () -> client.get(tableReference, key, column, consistency_level), ThriftQueryWeighers.GET); }
@Override public ColumnOrSuperColumn get(TableReference tableReference, ByteBuffer key, byte[] column, ConsistencyLevel consistency_level) throws InvalidRequestException, NotFoundException, UnavailableException, TimedOutException, TException { try (CloseableTrace trace = startLocalTrace("client.get(table {}, consistency {})", LoggingArgs.safeTableOrPlaceholder(tableReference), consistency_level)) { return client.get(tableReference, key, column, consistency_level); } }
@GuardedBy("CassandraTimestampBoundStore.this") @Override public Long apply(CassandraClient client) { ByteBuffer rowName = getRowName(); ColumnOrSuperColumn result; try { result = client.get(AtlasDbConstants.TIMESTAMP_TABLE, rowName, getColumnName(), ConsistencyLevel.LOCAL_QUORUM); } catch (NotFoundException e) { result = null; } catch (Exception e) { throw Throwables.throwUncheckedException(e); } if (result == null) { DebugLogger.logger.info("[GET] Null result, setting timestamp limit to {}", CassandraTimestampUtils.INITIAL_VALUE); cas(client, null, CassandraTimestampUtils.INITIAL_VALUE); return CassandraTimestampUtils.INITIAL_VALUE; } return extractUpperLimit(result); }
@Override public ColumnOrSuperColumn get(TableReference tableReference, ByteBuffer key, byte[] column, ConsistencyLevel consistency_level) throws InvalidRequestException, NotFoundException, UnavailableException, TimedOutException, TException { long startTime = System.currentTimeMillis(); return KvsProfilingLogger.maybeLog( (KvsProfilingLogger.CallableCheckedException<ColumnOrSuperColumn, TException>) () -> client.get(tableReference, key, column, consistency_level), (logger, timer) -> logger.log("CassandraClient.get({}, {}) at time {} took {} ms", LoggingArgs.tableRef(tableReference), SafeArg.of("consistency", consistency_level.toString()), LoggingArgs.startTimeMillis(startTime), LoggingArgs.durationMillis(timer))); }
@Override public ColumnOrSuperColumn get(TableReference tableReference, ByteBuffer key, byte[] column, ConsistencyLevel consistency_level) throws InvalidRequestException, NotFoundException, UnavailableException, TimedOutException, TException { return executeRead( () -> client.get(tableReference, key, column, consistency_level), ThriftQueryWeighers.GET); }
@Override public ColumnOrSuperColumn get(TableReference tableReference, ByteBuffer key, byte[] column, ConsistencyLevel consistency_level) throws InvalidRequestException, NotFoundException, UnavailableException, TimedOutException, TException { try (CloseableTrace trace = startLocalTrace("client.get(table {}, consistency {})", LoggingArgs.safeTableOrPlaceholder(tableReference), consistency_level)) { return client.get(tableReference, key, column, consistency_level); } }
@GuardedBy("CassandraTimestampBoundStore.this") @Override public Long apply(CassandraClient client) { ByteBuffer rowName = getRowName(); ColumnOrSuperColumn result; try { result = client.get(AtlasDbConstants.TIMESTAMP_TABLE, rowName, getColumnName(), ConsistencyLevel.LOCAL_QUORUM); } catch (NotFoundException e) { result = null; } catch (Exception e) { throw Throwables.throwUncheckedException(e); } if (result == null) { DebugLogger.logger.info("[GET] Null result, setting timestamp limit to {}", CassandraTimestampUtils.INITIAL_VALUE); cas(client, null, CassandraTimestampUtils.INITIAL_VALUE); return CassandraTimestampUtils.INITIAL_VALUE; } return extractUpperLimit(result); }
@Override public ColumnOrSuperColumn get(TableReference tableReference, ByteBuffer key, byte[] column, ConsistencyLevel consistency_level) throws InvalidRequestException, NotFoundException, UnavailableException, TimedOutException, TException { long startTime = System.currentTimeMillis(); return KvsProfilingLogger.maybeLog( (KvsProfilingLogger.CallableCheckedException<ColumnOrSuperColumn, TException>) () -> client.get(tableReference, key, column, consistency_level), (logger, timer) -> logger.log("CassandraClient.get({}, {}) at time {} took {} ms", LoggingArgs.tableRef(tableReference), SafeArg.of("consistency", consistency_level.toString()), LoggingArgs.startTimeMillis(startTime), LoggingArgs.durationMillis(timer))); }