code
stringlengths
73
34.1k
label
stringclasses
1 value
private boolean watchNextLowerNode() throws KeeperException, InterruptedException { /* * Iterate through the sorted list of children and find the given node, * then setup a electionWatcher on the previous node if it exists, otherwise the * previous of the previous...until we reach the...
java
@CanIgnoreReturnValue public CharEscaperBuilder addEscape(char c, String r) { map.put(c, checkNotNull(r)); if (c > max) { max = c; } return this; }
java
@CanIgnoreReturnValue public CharEscaperBuilder addEscapes(char[] cs, String r) { checkNotNull(r); for (char c : cs) { addEscape(c, r); } return this; }
java
private void deliverReadyTxns() { // First, pull all the sequenced messages, if any. VoltMessage m = m_replaySequencer.poll(); while(m != null) { deliver(m); m = m_replaySequencer.poll(); } // Then, try to pull all the drainable messages, if any. m...
java
@Override public boolean sequenceForReplay(VoltMessage message) { boolean canDeliver = false; long sequenceWithUniqueId = Long.MIN_VALUE; boolean commandLog = (message instanceof TransactionInfoBaseMessage && (((TransactionInfoBaseMessage)message).isForReplay())); ...
java
private void doLocalInitiateOffer(Iv2InitiateTaskMessage msg) { final VoltTrace.TraceEventBatch traceLog = VoltTrace.log(VoltTrace.Category.SPI); if (traceLog != null) { final String threadName = Thread.currentThread().getName(); // Thread name has to be materialized here tra...
java
private void handleBorrowTaskMessage(BorrowTaskMessage message) { // borrows do not advance the sp handle. The handle would // move backwards anyway once the next message is received // from the SP leader. long newSpHandle = getMaxScheduledTxnSpHandle(); Iv2Trace.logFragmentTaskM...
java
void handleFragmentTaskMessage(FragmentTaskMessage message) { FragmentTaskMessage msg = message; long newSpHandle; //The site has been marked as non-leader. The follow-up batches or fragments are processed here if (!message.isForReplica() && (m_isLeader || message.isExecutedOnPreviou...
java
public void offerPendingMPTasks(long txnId) { Queue<TransactionTask> pendingTasks = m_mpsPendingDurability.get(txnId); if (pendingTasks != null) { for (TransactionTask task : pendingTasks) { if (task instanceof SpProcedureTask) { final VoltTrace.TraceE...
java
private void queueOrOfferMPTask(TransactionTask task) { // The pending map will only have an entry for the transaction if the first fragment is // still pending durability. Queue<TransactionTask> pendingTasks = m_mpsPendingDurability.get(task.getTxnId()); if (pendingTasks != null) { ...
java
private void handleIv2LogFaultMessage(Iv2LogFaultMessage message) { //call the internal log write with the provided SP handle and wait for the fault log IO to complete SettableFuture<Boolean> written = writeIv2ViableReplayEntryInternal(message.getSpHandle()); // Get the Fault Log Status her...
java
private void blockFaultLogWriteStatus(SettableFuture<Boolean> written) { boolean logWritten = false; if (written != null) { try { logWritten = written.get(); } catch (InterruptedException e) { } catch (ExecutionException e) { if (tmLog...
java
SettableFuture<Boolean> writeIv2ViableReplayEntryInternal(long spHandle) { SettableFuture<Boolean> written = null; if (m_replayComplete) { written = m_cl.logIv2Fault(m_mailbox.getHSId(), new HashSet<Long>(m_replicaHSIds), m_partitionId, spHandle); } return...
java
public void updateReplicasFromMigrationLeaderFailedHost(int failedHostId) { List<Long> replicas = new ArrayList<>(); for (long hsid : m_replicaHSIds) { if (failedHostId != CoreUtils.getHostIdFromHSId(hsid)) { replicas.add(hsid); } } ((InitiatorMail...
java
public void forwardPendingTaskToRejoinNode(long[] replicasAdded, long snapshotSpHandle) { if (tmLog.isDebugEnabled()) { tmLog.debug("Forward pending tasks in backlog to rejoin node: " + Arrays.toString(replicasAdded)); } if (replicasAdded.length == 0) { return; } ...
java
@Override public void cleanupTransactionBacklogOnRepair() { if (m_isLeader && m_sendToHSIds.length > 0) { m_mailbox.send(m_sendToHSIds, new MPBacklogFlushMessage()); } Iterator<Entry<Long, TransactionState>> iter = m_outstandingTxns.entrySet().iterator(); while (iter.hasN...
java
synchronized void reset() { schemaMap.clear(); sqlLookup.clear(); csidMap.clear(); sessionUseMap.clear(); useMap.clear(); next_cs_id = 0; }
java
synchronized void resetStatements() { Iterator it = csidMap.values().iterator(); while (it.hasNext()) { Statement cs = (Statement) it.next(); cs.clearVariables(); } }
java
private long getStatementID(HsqlName schema, String sql) { LongValueHashMap sqlMap = (LongValueHashMap) schemaMap.get(schema.hashCode()); if (sqlMap == null) { return -1; } return sqlMap.get(sql, -1); }
java
public synchronized Statement getStatement(Session session, long csid) { Statement cs = (Statement) csidMap.get(csid); if (cs == null) { return null; } if (!cs.isValid()) { String sql = (String) sqlLookup.get(csid); // revalidate with the original ...
java
private void linkSession(long csid, long sessionID) { LongKeyIntValueHashMap scsMap; scsMap = (LongKeyIntValueHashMap) sessionUseMap.get(sessionID); if (scsMap == null) { scsMap = new LongKeyIntValueHashMap(); sessionUseMap.put(sessionID, scsMap); } i...
java
private long registerStatement(long csid, Statement cs) { if (csid < 0) { csid = nextID(); int schemaid = cs.getSchemaName().hashCode(); LongValueHashMap sqlMap = (LongValueHashMap) schemaMap.get(schemaid); if (sqlMap == null) { ...
java
synchronized void removeSession(long sessionID) { LongKeyIntValueHashMap scsMap; long csid; Iterator i; scsMap = (LongKeyIntValueHashMap) sessionUseMap.remove(sessionID); if (scsMap == null) { return; } i = scsMap.ke...
java
synchronized Statement compile(Session session, Result cmd) throws Throwable { String sql = cmd.getMainString(); long csid = getStatementID(session.currentSchema, sql); Statement cs = (Statement) csidMap.get(csid); if (cs == null || !cs.isV...
java
private void startupInstance() throws IOException { assert (m_blockPathMap.isEmpty()); try { clearSwapDir(); } catch (Exception e) { throw new IOException("Unable to clear large query swap directory: " + e.getMessage()); } }
java
void storeBlock(BlockId blockId, ByteBuffer block) throws IOException { synchronized (m_accessLock) { if (m_blockPathMap.containsKey(blockId)) { throw new IllegalArgumentException("Request to store block that is already stored: " + ...
java
void loadBlock(BlockId blockId, ByteBuffer block) throws IOException { synchronized (m_accessLock) { if (! m_blockPathMap.containsKey(blockId)) { throw new IllegalArgumentException("Request to load block that is not stored: " + blockId); } int origPosition = ...
java
void releaseBlock(BlockId blockId) throws IOException { synchronized (m_accessLock) { if (! m_blockPathMap.containsKey(blockId)) { throw new IllegalArgumentException("Request to release block that is not stored: " + blockId); } Path blockPath = m_blockPathMap...
java
private void releaseAllBlocks() throws IOException { synchronized (m_accessLock) { Set<Map.Entry<BlockId, Path>> entries = m_blockPathMap.entrySet(); while (! entries.isEmpty()) { Map.Entry<BlockId, Path> entry = entries.iterator().next(); Files.delete(ent...
java
Path makeBlockPath(BlockId id) { String filename = id.fileNameString(); return m_largeQuerySwapPath.resolve(filename); }
java
public static List<Shard> discoverShards(String regionName, String streamName, String accessKey, String secretKey, String appName) { try { Region region = RegionUtils.getRegion(regionName); if (region != null) { final AWSCredentials credentials = new BasicAWSC...
java
public static String getProperty(Properties props, String propertyName, String defaultValue) { String value = props.getProperty(propertyName, defaultValue).trim(); if (value.isEmpty()) { throw new IllegalArgumentException( "Property " + propertyName + " is missing in Kine...
java
public static long getPropertyAsLong(Properties props, String propertyName, long defaultValue) { String value = props.getProperty(propertyName, "").trim(); if (value.isEmpty()) { return defaultValue; } try { long val = Long.parseLong(value); if (val <=...
java
public synchronized boolean addChild(String child) { if (children == null) { // let's be conservative on the typical number of children children = new HashSet<String>(8); } return children.add(child); }
java
protected String getHostHeader() { if (m_hostHeader != null) { return m_hostHeader; } if (!httpAdminListener.m_publicIntf.isEmpty()) { m_hostHeader = httpAdminListener.m_publicIntf; return m_hostHeader; } InetAddress addr = null; int ...
java
void handleReportPage(HttpServletRequest request, HttpServletResponse response) { try { String report = ReportMaker.liveReport(); response.setContentType(HTML_CONTENT_TYPE); response.setStatus(HttpServletResponse.SC_OK); response.getWriter().print(report); ...
java
public int getIntegerProperty(String key, int defaultValue, int[] values) { String prop = getProperty(key); int value = defaultValue; try { if (prop != null) { value = Integer.parseInt(prop); } } catch (NumberFormatException e) {} if...
java
public void save() throws Exception { if (fileName == null || fileName.length() == 0) { throw new java.io.FileNotFoundException( Error.getMessage(ErrorCode.M_HsqlProperties_load)); } String filestring = fileName + ".properties"; save(filestring); }
java
public void save(String fileString) throws Exception { // oj@openoffice.org fa.createParentDirs(fileString); OutputStream fos = fa.openOutputStreamElement(fileString); FileAccess.FileSync outDescriptor = fa.getFileSync(fos); JavaSystem.saveProperties( stringProps, ...
java
private void addError(int code, String key) { errorCodes = (int[]) ArrayUtil.resizeArray(errorCodes, errorCodes.length + 1); errorKeys = (String[]) ArrayUtil.resizeArray(errorKeys, errorKeys.length + 1); errorCodes[errorCodes.length - 1] = code; errorKeys...
java
public void checkPassword(String value) { if (!value.equals(password)) { throw Error.error(ErrorCode.X_28000); } }
java
public String getCreateUserSQL() { StringBuffer sb = new StringBuffer(64); sb.append(Tokens.T_CREATE).append(' '); sb.append(Tokens.T_USER).append(' '); sb.append(getStatementName()).append(' '); sb.append(Tokens.T_PASSWORD).append(' '); sb.append(StringConverter.toQuot...
java
public String getConnectUserSQL() { StringBuffer sb = new StringBuffer(); sb.append(Tokens.T_SET).append(' '); sb.append(Tokens.T_SESSION).append(' '); sb.append(Tokens.T_AUTHORIZATION).append(' '); sb.append(StringConverter.toQuotedString(getNameString(), '\'', true)); ...
java
static ImmutableMap<String, PublicSuffixType> parseTrie(CharSequence encoded) { ImmutableMap.Builder<String, PublicSuffixType> builder = ImmutableMap.builder(); int encodedLen = encoded.length(); int idx = 0; while (idx < encodedLen) { idx += doParseTrieToBuilder( Lists.<Ch...
java
private static int doParseTrieToBuilder( List<CharSequence> stack, CharSequence encoded, ImmutableMap.Builder<String, PublicSuffixType> builder) { int encodedLen = encoded.length(); int idx = 0; char c = '\0'; // Read all of the characters for this node. for (; idx < encodedLen; ...
java
public static synchronized void initialize( int myHostId, CatalogContext catalogContext, boolean isRejoin, boolean forceCreate, HostMessenger messenger, List<Pair<Integer, Integer>> partitions) throws ExportManager.SetupException { ...
java
private void initialize(CatalogContext catalogContext, List<Pair<Integer, Integer>> localPartitionsToSites, boolean isRejoin) { try { CatalogMap<Connector> connectors = CatalogUtil.getConnectors(catalogContext); if (exportLog.isDebugEnabled()) { exportLog.debu...
java
private void swapWithNewProcessor( final CatalogContext catalogContext, ExportGeneration generation, CatalogMap<Connector> connectors, List<Pair<Integer, Integer>> partitions, Map<String, Pair<Properties, Set<String>>> config) { ExportDataProcessor...
java
@Override public String calculateContentDeterminismMessage() { String ans = getContentDeterminismMessage(); if (ans != null) { return ans; } if (m_subquery != null) { updateContentDeterminismMessage(m_subquery.calculateContentDeterminismMessage()); ...
java
public int getSortIndexOfOrderByExpression(AbstractExpression partitionByExpression) { for (int idx = 0; idx < m_orderByExpressions.size(); ++idx) { if (m_orderByExpressions.get(idx).equals(partitionByExpression)) { return idx; } } return -1; }
java
private boolean rewriteSelectStmt() { if (m_mvi != null) { final Table view = m_mvi.getDest(); final String viewName = view.getTypeName(); // Get the map of select stmt's display column index -> view table (column name, column index) m_selectStmt.getFinalProjectio...
java
private static boolean rewriteTableAlias(StmtSubqueryScan scan) { final AbstractParsedStmt stmt = scan.getSubqueryStmt(); return stmt instanceof ParsedSelectStmt && (new MVQueryRewriter((ParsedSelectStmt)stmt)).rewrite(); }
java
private static List<Integer> extractTVEIndices(AbstractExpression e, List<Integer> accum) { if (e != null) { if (e instanceof TupleValueExpression) { accum.add(((TupleValueExpression) e).getColumnIndex()); } else { extractTVEIndices(e.getRight(), extractTV...
java
private Map<Pair<String, Integer>, Pair<String, Integer>> gbyMatches(MaterializedViewInfo mv) { final FilterMatcher filter = new FilterMatcher(m_selectStmt.m_joinTree.getJoinExpression(), predicate_of(mv)); // *** Matching criteria/order: *** // 1. Filters match; // 2. Group-by-columns'...
java
private static Map<MaterializedViewInfo, Table> getMviAndViews(List<Table> tbls) { return tbls.stream().flatMap(tbl -> StreamSupport.stream(((Iterable<MaterializedViewInfo>) () -> tbl.getViews().iterator()).spliterator(), false) .map(mv -> Pair.of(mv, mv.getDest()))) ...
java
private static AbstractExpression transformExpressionRidofPVE(AbstractExpression src) { AbstractExpression left = src.getLeft(), right = src.getRight(); if (left != null) { left = transformExpressionRidofPVE(left); } if (right != null) { right = transformExpressio...
java
private static List<AbstractExpression> getGbyExpressions(MaterializedViewInfo mv) { try { return AbstractExpression.fromJSONArrayString(mv.getGroupbyexpressionsjson(), null); } catch (JSONException e) { return new ArrayList<>(); } }
java
private boolean isNpTxn(Iv2InitiateTaskMessage msg) { return msg.getStoredProcedureName().startsWith("@") && msg.getStoredProcedureName().equalsIgnoreCase("@BalancePartitions") && (byte) msg.getParameters()[1] != 1; // clearIndex is MP, normal rebalance is NP }
java
private Set<Integer> getBalancePartitions(Iv2InitiateTaskMessage msg) { try { JSONObject jsObj = new JSONObject((String) msg.getParameters()[0]); BalancePartitionsRequest request = new BalancePartitionsRequest(jsObj); return Sets.newHashSet(request.partitionPairs.get(0)....
java
public void handleInitiateResponseMessage(InitiateResponseMessage message) { final VoltTrace.TraceEventBatch traceLog = VoltTrace.log(VoltTrace.Category.MPI); if (traceLog != null) { traceLog.add(() -> VoltTrace.endAsync("initmp", message.getTxnId())); } DuplicateCounter...
java
public void handleEOLMessage() { Iv2EndOfLogMessage msg = new Iv2EndOfLogMessage(m_partitionId); MPIEndOfLogTransactionState txnState = new MPIEndOfLogTransactionState(msg); MPIEndOfLogTask task = new MPIEndOfLogTask(m_mailbox, m_pendingTasks, ...
java
private static ProClass<MpProcedureTask> loadNpProcedureTaskClass() { return ProClass .<MpProcedureTask>load("org.voltdb.iv2.NpProcedureTask", "N-Partition", MiscUtils.isPro() ? ProClass.HANDLER_LOG : ProClass.HANDLER_IGNORE) .errorHandler(tmLog::error...
java
void safeAddToDuplicateCounterMap(long dpKey, DuplicateCounter counter) { DuplicateCounter existingDC = m_duplicateCounters.get(dpKey); if (existingDC != null) { // this is a collision and is bad existingDC.logWithCollidingDuplicateCounters(counter); VoltDB.crashGloba...
java
Table ADMINISTRABLE_ROLE_AUTHORIZATIONS() { Table t = sysTables[ADMINISTRABLE_ROLE_AUTHORIZATIONS]; if (t == null) { t = createBlankTable( sysTableHsqlNames[ADMINISTRABLE_ROLE_AUTHORIZATIONS]); addColumn(t, "GRANTEE", SQL_IDENTIFIER); addColumn(t, "...
java
Table ROUTINE_ROUTINE_USAGE() { Table t = sysTables[ROUTINE_ROUTINE_USAGE]; if (t == null) { t = createBlankTable(sysTableHsqlNames[ROUTINE_ROUTINE_USAGE]); addColumn(t, "SPECIFIC_CATALOG", SQL_IDENTIFIER); addColumn(t, "SPECIFIC_SCHEMA", SQL_IDENTIFIER); ...
java
public ListenableFuture<?> closeAndDelete() { // We're going away, so shut ourselves from the external world m_closed = true; m_ackMailboxRefs.set(null); // Export mastership should have been released: force it. m_mastershipAccepted.set(false); // FIXME: necessary? Old...
java
public void setPendingContainer(AckingContainer container) { Preconditions.checkNotNull(m_pendingContainer.get() != null, "Pending container must be null."); if (m_closed) { // A very slow export decoder must have noticed the export processor shutting down exportLog.info("Discard...
java
public void remoteAck(final long seq) { //In replicated only master will be doing this. m_es.execute(new Runnable() { @Override public void run() { try { // ENG-12282: A race condition between export data source // master p...
java
private void handleDrainedSource() throws IOException { if (!inCatalog() && m_committedBuffers.isEmpty()) { //Returning null indicates end of stream try { if (m_pollTask != null) { m_pollTask.setFuture(null); } } catc...
java
public synchronized void acceptMastership() { if (m_onMastership == null) { if (exportLog.isDebugEnabled()) { exportLog.debug("Mastership Runnable not yet set for table " + getTableName() + " partition " + getPartitionId()); } return; } if (m_m...
java
public void setOnMastership(Runnable toBeRunOnMastership) { Preconditions.checkNotNull(toBeRunOnMastership, "mastership runnable is null"); m_onMastership = toBeRunOnMastership; // If connector "replicated" property is set to true then every // replicated export stream is its own master ...
java
public void handleQueryMessage(final long senderHSId, long requestId, long gapStart) { m_es.execute(new Runnable() { @Override public void run() { long lastSeq = Long.MIN_VALUE; Pair<Long, Long> range = m_gapTracker.getRangeContaining(g...
java
private void resetStateInRejoinOrRecover(long initialSequenceNumber, boolean isRejoin) { if (isRejoin) { if (!m_gapTracker.isEmpty()) { m_lastReleasedSeqNo = Math.max(m_lastReleasedSeqNo, m_gapTracker.getFirstSeqNo() - 1); } } else { m_lastReleasedSeqN...
java
public static Date getDateFromTransactionId(long txnId) { long time = txnId >> (COUNTER_BITS + INITIATORID_BITS); time += VOLT_EPOCH; return new Date(time); }
java
private AbstractTopology recoverPartitions(AbstractTopology topology, String haGroup, Set<Integer> recoverPartitions) { long version = topology.version; if (!recoverPartitions.isEmpty()) { // In rejoin case, partition list from the rejoining node could be out of range if the rejoining ...
java
private boolean stopRejoiningHost() { // The host failure notification could come before mesh determination, wait for the determination try { m_meshDeterminationLatch.await(); } catch (InterruptedException e) { } if (m_rejoining) { VoltDB.crashLocalVoltD...
java
private void checkExportStreamMastership() { for (Initiator initiator : m_iv2Initiators.values()) { if (initiator.getPartitionId() != MpInitiator.MP_INIT_PID) { SpInitiator spInitiator = (SpInitiator)initiator; if (spInitiator.isLeader()) { ExportM...
java
void scheduleDailyLoggingWorkInNextCheckTime() { DailyRollingFileAppender dailyAppender = null; Enumeration<?> appenders = Logger.getRootLogger().getAllAppenders(); while (appenders.hasMoreElements()) { Appender appender = (Appender) appenders.nextElement(); if (appender ...
java
private void schedulePeriodicWorks() { // JMX stats broadcast m_periodicWorks.add(scheduleWork(new Runnable() { @Override public void run() { // A null here was causing a steady stream of annoying but apparently inconsequential // NPEs during a deb...
java
private boolean determineIfEligibleAsLeader(Collection<Integer> partitions, Set<Integer> partitionGroupPeers, AbstractTopology topology) { if (partitions.contains(Integer.valueOf(0))) { return true; } for (Integer host : topology.getHostIdList(0)) { if (partit...
java
@Override public void run() { if (m_restoreAgent != null) { // start restore process m_restoreAgent.restore(); } else { onSnapshotRestoreCompletion(); onReplayCompletion(Long.MIN_VALUE, m_iv2InitiatorStartingTxnIds); } // Start...
java
@Override public void cleanUpTempCatalogJar() { File configInfoDir = getConfigDirectory(); if (!configInfoDir.exists()) { return; } File tempJar = new VoltFile(configInfoDir.getPath(), InMemoryJarfile.TMP_CATALOG_JAR_FILENAME); ...
java
private void shutdownInitiators() { if (m_iv2Initiators == null) { return; } m_iv2Initiators.descendingMap().values().stream().forEach(p->p.shutdown()); }
java
public void createRuntimeReport(PrintStream out) { // This function may be running in its own thread. out.print("MIME-Version: 1.0\n"); out.print("Content-type: multipart/mixed; boundary=\"reportsection\""); out.print("\n\n--reportsection\nContent-Type: text/plain\n\nClientInterface Re...
java
private void initializeDRProducer() { try { if (m_producerDRGateway != null) { m_producerDRGateway.startAndWaitForGlobalAgreement(); for (Initiator iv2init : m_iv2Initiators.values()) { iv2init.initDRGateway(m_config.m_startAction, ...
java
static public long computeMinimumHeapRqt(int tableCount, int sitesPerHost, int kfactor) { long baseRqt = 384; long tableRqt = 10 * tableCount; // K-safety Heap consumption drop to 8 MB (per node) // Snapshot cost 32 MB (per node) // Theoretically, 40 MB (per node) should be e...
java
synchronized void prepareCommit(Session session) { RowActionBase action = this; do { if (action.session == session && action.commitTimestamp == 0) { action.prepared = true; } action = action.next; } while (action != null); }
java
synchronized void rollback(Session session, long timestamp) { RowActionBase action = this; do { if (action.session == session && action.commitTimestamp == 0) { if (action.actionTimestamp >= timestamp || action.actionTimestamp == 0) { ...
java
synchronized int getCommitType(long timestamp) { RowActionBase action = this; int type = ACTION_NONE; do { if (action.commitTimestamp == timestamp) { type = action.type; } action = action.next; } while (action != null); ...
java
synchronized boolean canCommit(Session session, OrderedHashSet set) { RowActionBase action; long timestamp = session.transactionTimestamp; long commitTimestamp = 0; final boolean readCommitted = session.isolationMode == Sessi...
java
synchronized void mergeRollback(Row row) { RowActionBase action = this; RowActionBase head = null; RowActionBase tail = null; if (type == RowActionBase.ACTION_DELETE_FINAL || type == RowActionBase.ACTION_NONE) { return; } do { ...
java
private void adjustReplicationFactorForURI(HttpPut httpPut) throws URISyntaxException{ String queryString = httpPut.getURI().getQuery(); if(!StringUtils.isEmpty(queryString) && queryString.contains("op=CREATE") && (queryString.contains("replication=") || !StringUtils.isEmpty(m_blockReplication))){ ...
java
private List<NameValuePair> sign(URI uri, final List<NameValuePair> params) { Preconditions.checkNotNull(m_secret); final List<NameValuePair> sortedParams = Lists.newArrayList(params); Collections.sort(sortedParams, new Comparator<NameValuePair>() { @Override public ...
java
public final FluentIterable<T> preOrderTraversal(final T root) { checkNotNull(root); return new FluentIterable<T>() { @Override public UnmodifiableIterator<T> iterator() { return preOrderIterator(root); } }; }
java
public final FluentIterable<T> breadthFirstTraversal(final T root) { checkNotNull(root); return new FluentIterable<T>() { @Override public UnmodifiableIterator<T> iterator() { return new BreadthFirstIterator(root); } }; }
java
public String getUserName() throws SQLException { ResultSet rs = execute("CALL USER()"); rs.next(); String result = rs.getString(1); rs.close(); return result; }
java
public boolean isReadOnly() throws SQLException { ResultSet rs = execute("CALL isReadOnlyDatabase()"); rs.next(); boolean result = rs.getBoolean(1); rs.close(); return result; }
java
private StringBuffer toQueryPrefixNoSelect(String t) { StringBuffer sb = new StringBuffer(255); return sb.append(t).append(whereTrue); }
java
public static ConstantValueExpression makeExpression(VoltType dataType, String value) { ConstantValueExpression constantExpr = new ConstantValueExpression(); constantExpr.setValueType(dataType); constantExpr.setValue(value); return constantExpr; }
java
Result executeUpdateStatement(Session session) { int count = 0; Expression[] colExpressions = updateExpressions; HashMappedList rowset = new HashMappedList(); Type[] colTypes = baseTable.getColumnTypes(); RangeIteratorBase it = RangeVa...
java