InternalStateInstance() { ClientState state = ClientState.forInternalCalls(); try { state.setKeyspace(Keyspace.SYSTEM_KS); } catch (InvalidRequestException e) { throw new RuntimeException(); } this.queryState = new QueryState(state); } }
public ResultMessage execute(QueryState state, QueryOptions options) throws InvalidRequestException { state.getClientState().setKeyspace(keyspace); return new ResultMessage.SetKeyspace(keyspace); }
InternalStateInstance() { ClientState state = ClientState.forInternalCalls(); state.setKeyspace(SchemaConstants.SYSTEM_KEYSPACE_NAME); this.queryState = new QueryState(state); } }
public ResultMessage execute(QueryState state, QueryOptions options, long queryStartNanoTime) throws InvalidRequestException { state.getClientState().setKeyspace(keyspace); return new ResultMessage.SetKeyspace(keyspace); }
InternalStateInstance() { ClientState state = ClientState.forInternalCalls(); state.setKeyspace(SchemaConstants.SYSTEM_KEYSPACE_NAME); this.queryState = new QueryState(state); } }
public ResultMessage execute(QueryState state, QueryOptions options, long queryStartNanoTime) throws InvalidRequestException { state.getClientState().setKeyspace(keyspace); return new ResultMessage.SetKeyspace(keyspace); }
InternalStateInstance() { ClientState state = ClientState.forInternalCalls(); state.setKeyspace(SchemaConstants.SYSTEM_KEYSPACE_NAME); this.queryState = new QueryState(state); } }
public ResultMessage execute(QueryState state, QueryOptions options, long queryStartNanoTime) throws InvalidRequestException { state.getClientState().setKeyspace(keyspace); return new ResultMessage.SetKeyspace(keyspace); }
public static void preloadPreparedStatement() { ClientState clientState = ClientState.forInternalCalls(); int count = 0; for (Pair<String, String> useKeyspaceAndCQL : SystemKeyspace.loadPreparedStatements()) { try { clientState.setKeyspace(useKeyspaceAndCQL.left); prepare(useKeyspaceAndCQL.right, clientState, false); count++; } catch (RequestValidationException e) { logger.warn("prepared statement recreation error: {}", useKeyspaceAndCQL.right, e); } } logger.info("Preloaded {} prepared statements", count); }
public static void preloadPreparedStatement() { ClientState clientState = ClientState.forInternalCalls(); int count = 0; for (Pair<String, String> useKeyspaceAndCQL : SystemKeyspace.loadPreparedStatements()) { try { clientState.setKeyspace(useKeyspaceAndCQL.left); prepare(useKeyspaceAndCQL.right, clientState, false); count++; } catch (RequestValidationException e) { logger.warn("prepared statement recreation error: {}", useKeyspaceAndCQL.right, e); } } logger.info("Preloaded {} prepared statements", count); }
public static void preloadPreparedStatement() { ClientState clientState = ClientState.forInternalCalls(); int count = 0; for (Pair<String, String> useKeyspaceAndCQL : SystemKeyspace.loadPreparedStatements()) { try { clientState.setKeyspace(useKeyspaceAndCQL.left); prepare(useKeyspaceAndCQL.right, clientState, false); count++; } catch (RequestValidationException e) { logger.warn("prepared statement recreation error: {}", useKeyspaceAndCQL.right, e); } } logger.info("Preloaded {} prepared statements", count); }
/** * Returns the SelectStatement used to populate and filter this view. Internal users should access the select * statement this way to ensure it has been prepared. */ public SelectStatement getSelectStatement() { if (select == null) { ClientState state = ClientState.forInternalCalls(); state.setKeyspace(baseCfs.keyspace.getName()); rawSelect.prepareKeyspace(state); ParsedStatement.Prepared prepared = rawSelect.prepare(true, ClientState.forInternalCalls()); select = (SelectStatement) prepared.statement; } return select; }
/** * Returns the SelectStatement used to populate and filter this view. Internal users should access the select * statement this way to ensure it has been prepared. */ public SelectStatement getSelectStatement() { if (select == null) { ClientState state = ClientState.forInternalCalls(); state.setKeyspace(baseCfs.keyspace.getName()); rawSelect.prepareKeyspace(state); ParsedStatement.Prepared prepared = rawSelect.prepare(true, ClientState.forInternalCalls()); select = (SelectStatement) prepared.statement; } return select; }
/** * Returns the SelectStatement used to populate and filter this view. Internal users should access the select * statement this way to ensure it has been prepared. */ public SelectStatement getSelectStatement() { if (select == null) { ClientState state = ClientState.forInternalCalls(); state.setKeyspace(baseCfs.keyspace.getName()); rawSelect.prepareKeyspace(state); ParsedStatement.Prepared prepared = rawSelect.prepare(true, ClientState.forInternalCalls()); select = (SelectStatement) prepared.statement; } return select; }
state.setKeyspace(keyspace());
state.setKeyspace(keyspace());
state.setKeyspace(keyspace());