id
int32
0
165k
repo
stringlengths
7
58
path
stringlengths
12
218
func_name
stringlengths
3
140
original_string
stringlengths
73
34.1k
language
stringclasses
1 value
code
stringlengths
73
34.1k
code_tokens
list
docstring
stringlengths
3
16k
docstring_tokens
list
sha
stringlengths
40
40
url
stringlengths
105
339
62,200
VoltDB/voltdb
src/frontend/org/voltdb/sysprocs/saverestore/StreamSnapshotWritePlan.java
StreamSnapshotWritePlan.coalesceTruncationSnapshotPlan
private Callable<Boolean> coalesceTruncationSnapshotPlan(String file_path, String pathType, String file_nonce, long txnId, Map<Integer, Long> partitionTransactionIds, SystemProcedureExecutionContext...
java
private Callable<Boolean> coalesceTruncationSnapshotPlan(String file_path, String pathType, String file_nonce, long txnId, Map<Integer, Long> partitionTransactionIds, SystemProcedureExecutionContext...
[ "private", "Callable", "<", "Boolean", ">", "coalesceTruncationSnapshotPlan", "(", "String", "file_path", ",", "String", "pathType", ",", "String", "file_nonce", ",", "long", "txnId", ",", "Map", "<", "Integer", ",", "Long", ">", "partitionTransactionIds", ",", ...
NativeSnapshotWritePlan to include all tables.
[ "NativeSnapshotWritePlan", "to", "include", "all", "tables", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/sysprocs/saverestore/StreamSnapshotWritePlan.java#L245-L271
62,201
VoltDB/voltdb
src/frontend/org/voltcore/messaging/ForeignHost.java
ForeignHost.killSocket
void killSocket() { try { m_closing = true; m_socket.setKeepAlive(false); m_socket.setSoLinger(false, 0); Thread.sleep(25); m_socket.close(); Thread.sleep(25); System.gc(); Thread.sleep(25); } catch (...
java
void killSocket() { try { m_closing = true; m_socket.setKeepAlive(false); m_socket.setSoLinger(false, 0); Thread.sleep(25); m_socket.close(); Thread.sleep(25); System.gc(); Thread.sleep(25); } catch (...
[ "void", "killSocket", "(", ")", "{", "try", "{", "m_closing", "=", "true", ";", "m_socket", ".", "setKeepAlive", "(", "false", ")", ";", "m_socket", ".", "setSoLinger", "(", "false", ",", "0", ")", ";", "Thread", ".", "sleep", "(", "25", ")", ";", ...
Used only for test code to kill this FH
[ "Used", "only", "for", "test", "code", "to", "kill", "this", "FH" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltcore/messaging/ForeignHost.java#L188-L203
62,202
VoltDB/voltdb
src/frontend/org/voltcore/messaging/ForeignHost.java
ForeignHost.send
void send(final long destinations[], final VoltMessage message) { if (!m_isUp) { hostLog.warn("Failed to send VoltMessage because connection to host " + CoreUtils.getHostIdFromHSId(destinations[0])+ " is closed"); return; } if (destinations.length == 0...
java
void send(final long destinations[], final VoltMessage message) { if (!m_isUp) { hostLog.warn("Failed to send VoltMessage because connection to host " + CoreUtils.getHostIdFromHSId(destinations[0])+ " is closed"); return; } if (destinations.length == 0...
[ "void", "send", "(", "final", "long", "destinations", "[", "]", ",", "final", "VoltMessage", "message", ")", "{", "if", "(", "!", "m_isUp", ")", "{", "hostLog", ".", "warn", "(", "\"Failed to send VoltMessage because connection to host \"", "+", "CoreUtils", "."...
Send a message to the network. This public method is re-entrant.
[ "Send", "a", "message", "to", "the", "network", ".", "This", "public", "method", "is", "re", "-", "entrant", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltcore/messaging/ForeignHost.java#L223-L302
62,203
VoltDB/voltdb
src/frontend/org/voltcore/messaging/ForeignHost.java
ForeignHost.deliverMessage
private void deliverMessage(long destinationHSId, VoltMessage message) { if (!m_hostMessenger.validateForeignHostId(m_hostId)) { hostLog.warn(String.format("Message (%s) sent to site id: %s @ (%s) at %d from %s " + "which is a known failed host. The message will be dropped\n", ...
java
private void deliverMessage(long destinationHSId, VoltMessage message) { if (!m_hostMessenger.validateForeignHostId(m_hostId)) { hostLog.warn(String.format("Message (%s) sent to site id: %s @ (%s) at %d from %s " + "which is a known failed host. The message will be dropped\n", ...
[ "private", "void", "deliverMessage", "(", "long", "destinationHSId", ",", "VoltMessage", "message", ")", "{", "if", "(", "!", "m_hostMessenger", ".", "validateForeignHostId", "(", "m_hostId", ")", ")", "{", "hostLog", ".", "warn", "(", "String", ".", "format",...
Deliver a deserialized message from the network to a local mailbox
[ "Deliver", "a", "deserialized", "message", "from", "the", "network", "to", "a", "local", "mailbox" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltcore/messaging/ForeignHost.java#L313-L347
62,204
VoltDB/voltdb
src/frontend/org/voltcore/messaging/ForeignHost.java
ForeignHost.handleRead
private void handleRead(ByteBuffer in, Connection c) throws IOException { // port is locked by VoltNetwork when in valid use. // assert(m_port.m_lock.tryLock() == true); long recvDests[] = null; final long sourceHSId = in.getLong(); final int destCount = in.getInt(); if ...
java
private void handleRead(ByteBuffer in, Connection c) throws IOException { // port is locked by VoltNetwork when in valid use. // assert(m_port.m_lock.tryLock() == true); long recvDests[] = null; final long sourceHSId = in.getLong(); final int destCount = in.getInt(); if ...
[ "private", "void", "handleRead", "(", "ByteBuffer", "in", ",", "Connection", "c", ")", "throws", "IOException", "{", "// port is locked by VoltNetwork when in valid use.", "// assert(m_port.m_lock.tryLock() == true);", "long", "recvDests", "[", "]", "=", "null", ";", "fin...
Read data from the network. Runs in the context of PicoNetwork thread when data is available. @throws IOException
[ "Read", "data", "from", "the", "network", ".", "Runs", "in", "the", "context", "of", "PicoNetwork", "thread", "when", "data", "is", "available", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltcore/messaging/ForeignHost.java#L354-L425
62,205
VoltDB/voltdb
third_party/java/src/com/google_voltpatches/common/collect/TreeMultiset.java
TreeMultiset.firstNode
@Nullable private AvlNode<E> firstNode() { AvlNode<E> root = rootReference.get(); if (root == null) { return null; } AvlNode<E> node; if (range.hasLowerBound()) { E endpoint = range.getLowerEndpoint(); node = rootReference.get().ceiling(comparator(), endpoint); if (node == ...
java
@Nullable private AvlNode<E> firstNode() { AvlNode<E> root = rootReference.get(); if (root == null) { return null; } AvlNode<E> node; if (range.hasLowerBound()) { E endpoint = range.getLowerEndpoint(); node = rootReference.get().ceiling(comparator(), endpoint); if (node == ...
[ "@", "Nullable", "private", "AvlNode", "<", "E", ">", "firstNode", "(", ")", "{", "AvlNode", "<", "E", ">", "root", "=", "rootReference", ".", "get", "(", ")", ";", "if", "(", "root", "==", "null", ")", "{", "return", "null", ";", "}", "AvlNode", ...
Returns the first node in the tree that is in range.
[ "Returns", "the", "first", "node", "in", "the", "tree", "that", "is", "in", "range", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/third_party/java/src/com/google_voltpatches/common/collect/TreeMultiset.java#L362-L383
62,206
VoltDB/voltdb
third_party/java/src/com/google_voltpatches/common/net/MediaType.java
MediaType.create
public static MediaType create(String type, String subtype) { return create(type, subtype, ImmutableListMultimap.<String, String>of()); }
java
public static MediaType create(String type, String subtype) { return create(type, subtype, ImmutableListMultimap.<String, String>of()); }
[ "public", "static", "MediaType", "create", "(", "String", "type", ",", "String", "subtype", ")", "{", "return", "create", "(", "type", ",", "subtype", ",", "ImmutableListMultimap", ".", "<", "String", ",", "String", ">", "of", "(", ")", ")", ";", "}" ]
Creates a new media type with the given type and subtype. @throws IllegalArgumentException if type or subtype is invalid or if a wildcard is used for the type, but not the subtype.
[ "Creates", "a", "new", "media", "type", "with", "the", "given", "type", "and", "subtype", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/third_party/java/src/com/google_voltpatches/common/net/MediaType.java#L682-L684
62,207
VoltDB/voltdb
src/frontend/org/voltdb/iv2/MpTransactionState.java
MpTransactionState.getSerializedParamSizeForApplyBinaryLog
private static int getSerializedParamSizeForApplyBinaryLog(int streamCount, int remotePartitionCount, int concatLogSize) { int serializedParamSize = 2 + 1 + 4 // placeholder byte[0] + 1 + 4 ...
java
private static int getSerializedParamSizeForApplyBinaryLog(int streamCount, int remotePartitionCount, int concatLogSize) { int serializedParamSize = 2 + 1 + 4 // placeholder byte[0] + 1 + 4 ...
[ "private", "static", "int", "getSerializedParamSizeForApplyBinaryLog", "(", "int", "streamCount", ",", "int", "remotePartitionCount", ",", "int", "concatLogSize", ")", "{", "int", "serializedParamSize", "=", "2", "+", "1", "+", "4", "// placeholder byte[0]", "+", "1...
calculate based on BinaryLogHelper and ParameterSet.fromArrayNoCopy
[ "calculate", "based", "on", "BinaryLogHelper", "and", "ParameterSet", ".", "fromArrayNoCopy" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/iv2/MpTransactionState.java#L164-L175
62,208
VoltDB/voltdb
src/frontend/org/voltdb/iv2/MpTransactionState.java
MpTransactionState.restart
void restart() { // The poisoning path will, unfortunately, set this to true. Need to undo that. setNeedsRollback(false); // Also need to make sure that we get the original invocation in the first fragment // since some masters may not have seen it. m_haveDistributedInitTask...
java
void restart() { // The poisoning path will, unfortunately, set this to true. Need to undo that. setNeedsRollback(false); // Also need to make sure that we get the original invocation in the first fragment // since some masters may not have seen it. m_haveDistributedInitTask...
[ "void", "restart", "(", ")", "{", "// The poisoning path will, unfortunately, set this to true. Need to undo that.", "setNeedsRollback", "(", "false", ")", ";", "// Also need to make sure that we get the original invocation in the first fragment", "// since some masters may not have seen it...
Used to reset the internal state of this transaction so it can be successfully restarted
[ "Used", "to", "reset", "the", "internal", "state", "of", "this", "transaction", "so", "it", "can", "be", "successfully", "restarted" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/iv2/MpTransactionState.java#L207-L217
62,209
VoltDB/voltdb
src/frontend/org/voltdb/iv2/MpTransactionState.java
MpTransactionState.setupProcedureResume
@Override public void setupProcedureResume(int[] dependencies) { // Reset state so we can run this batch cleanly m_localWork = null; m_remoteWork = null; m_remoteDeps = null; m_remoteDepTables.clear(); }
java
@Override public void setupProcedureResume(int[] dependencies) { // Reset state so we can run this batch cleanly m_localWork = null; m_remoteWork = null; m_remoteDeps = null; m_remoteDepTables.clear(); }
[ "@", "Override", "public", "void", "setupProcedureResume", "(", "int", "[", "]", "dependencies", ")", "{", "// Reset state so we can run this batch cleanly", "m_localWork", "=", "null", ";", "m_remoteWork", "=", "null", ";", "m_remoteDeps", "=", "null", ";", "m_remo...
Overrides needed by MpProcedureRunner
[ "Overrides", "needed", "by", "MpProcedureRunner" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/iv2/MpTransactionState.java#L232-L240
62,210
VoltDB/voltdb
src/frontend/org/voltdb/iv2/MpTransactionState.java
MpTransactionState.setupProcedureResume
public void setupProcedureResume(List<Integer> deps) { setupProcedureResume(com.google_voltpatches.common.primitives.Ints.toArray(deps)); }
java
public void setupProcedureResume(List<Integer> deps) { setupProcedureResume(com.google_voltpatches.common.primitives.Ints.toArray(deps)); }
[ "public", "void", "setupProcedureResume", "(", "List", "<", "Integer", ">", "deps", ")", "{", "setupProcedureResume", "(", "com", ".", "google_voltpatches", ".", "common", ".", "primitives", ".", "Ints", ".", "toArray", "(", "deps", ")", ")", ";", "}" ]
I met this List at bandcamp...
[ "I", "met", "this", "List", "at", "bandcamp", "..." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/iv2/MpTransactionState.java#L243-L246
62,211
VoltDB/voltdb
src/frontend/org/voltdb/iv2/MpTransactionState.java
MpTransactionState.restartFragment
public void restartFragment(FragmentResponseMessage message, List<Long> masters, Map<Integer, Long> partitionMastersMap) { final int partionId = message.getPartitionId(); Long restartHsid = partitionMastersMap.get(partionId); Long hsid = message.getExecutorSiteId(); if (!hsid.equals(rest...
java
public void restartFragment(FragmentResponseMessage message, List<Long> masters, Map<Integer, Long> partitionMastersMap) { final int partionId = message.getPartitionId(); Long restartHsid = partitionMastersMap.get(partionId); Long hsid = message.getExecutorSiteId(); if (!hsid.equals(rest...
[ "public", "void", "restartFragment", "(", "FragmentResponseMessage", "message", ",", "List", "<", "Long", ">", "masters", ",", "Map", "<", "Integer", ",", "Long", ">", "partitionMastersMap", ")", "{", "final", "int", "partionId", "=", "message", ".", "getParti...
Restart this fragment after the fragment is mis-routed from MigratePartitionLeader If the masters have been updated, the fragment will be routed to its new master. The fragment will be routed to the old master. until new master is updated. @param message The mis-routed response message @param partitionMastersMap The cu...
[ "Restart", "this", "fragment", "after", "the", "fragment", "is", "mis", "-", "routed", "from", "MigratePartitionLeader", "If", "the", "masters", "have", "been", "updated", "the", "fragment", "will", "be", "routed", "to", "its", "new", "master", ".", "The", "...
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/iv2/MpTransactionState.java#L648-L668
62,212
VoltDB/voltdb
src/catgen/in/javasrc/CatalogDiffEngine.java
CatalogDiffEngine.checkNewUniqueIndex
private boolean checkNewUniqueIndex(Index newIndex) { Table table = (Table) newIndex.getParent(); CatalogMap<Index> existingIndexes = m_originalIndexesByTable.get(table.getTypeName()); for (Index existingIndex : existingIndexes) { if (indexCovers(newIndex, existingIndex)) { ...
java
private boolean checkNewUniqueIndex(Index newIndex) { Table table = (Table) newIndex.getParent(); CatalogMap<Index> existingIndexes = m_originalIndexesByTable.get(table.getTypeName()); for (Index existingIndex : existingIndexes) { if (indexCovers(newIndex, existingIndex)) { ...
[ "private", "boolean", "checkNewUniqueIndex", "(", "Index", "newIndex", ")", "{", "Table", "table", "=", "(", "Table", ")", "newIndex", ".", "getParent", "(", ")", ";", "CatalogMap", "<", "Index", ">", "existingIndexes", "=", "m_originalIndexesByTable", ".", "g...
Check if there is a unique index that exists in the old catalog that is covered by the new index. That would mean adding this index can't fail with a duplicate key. @param newIndex The new index to check. @return True if the index can be created without a chance of failing.
[ "Check", "if", "there", "is", "a", "unique", "index", "that", "exists", "in", "the", "old", "catalog", "that", "is", "covered", "by", "the", "new", "index", ".", "That", "would", "mean", "adding", "this", "index", "can", "t", "fail", "with", "a", "dupl...
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/catgen/in/javasrc/CatalogDiffEngine.java#L388-L397
62,213
VoltDB/voltdb
src/catgen/in/javasrc/CatalogDiffEngine.java
CatalogDiffEngine.createViewDisallowedMessage
private String createViewDisallowedMessage(String viewName, String singleTableName) { boolean singleTable = (singleTableName != null); return String.format( "Unable to create %sview %s %sbecause the view definition uses operations that cannot always be applied if %s.", (s...
java
private String createViewDisallowedMessage(String viewName, String singleTableName) { boolean singleTable = (singleTableName != null); return String.format( "Unable to create %sview %s %sbecause the view definition uses operations that cannot always be applied if %s.", (s...
[ "private", "String", "createViewDisallowedMessage", "(", "String", "viewName", ",", "String", "singleTableName", ")", "{", "boolean", "singleTable", "=", "(", "singleTableName", "!=", "null", ")", ";", "return", "String", ".", "format", "(", "\"Unable to create %svi...
Return an error message asserting that we cannot create a view with a given name. @param viewName The name of the view we are refusing to create. @param singleTableName The name of the source table if there is one source table. If there are multiple tables this should be null. This only affects the wording of the er...
[ "Return", "an", "error", "message", "asserting", "that", "we", "cannot", "create", "a", "view", "with", "a", "given", "name", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/catgen/in/javasrc/CatalogDiffEngine.java#L809-L823
62,214
VoltDB/voltdb
src/catgen/in/javasrc/CatalogDiffEngine.java
CatalogDiffEngine.getMVHandlerInfoMessage
private TablePopulationRequirements getMVHandlerInfoMessage(MaterializedViewHandlerInfo mvh) { if ( ! mvh.getIssafewithnonemptysources()) { TablePopulationRequirements retval; String viewName = mvh.getDesttable().getTypeName(); String errorMessage = createViewDisallowedMessag...
java
private TablePopulationRequirements getMVHandlerInfoMessage(MaterializedViewHandlerInfo mvh) { if ( ! mvh.getIssafewithnonemptysources()) { TablePopulationRequirements retval; String viewName = mvh.getDesttable().getTypeName(); String errorMessage = createViewDisallowedMessag...
[ "private", "TablePopulationRequirements", "getMVHandlerInfoMessage", "(", "MaterializedViewHandlerInfo", "mvh", ")", "{", "if", "(", "!", "mvh", ".", "getIssafewithnonemptysources", "(", ")", ")", "{", "TablePopulationRequirements", "retval", ";", "String", "viewName", ...
Check a MaterializedViewHandlerInfo object for safety. Return an object with table population requirements on the table for it to be allowed. The return object, if it is non-null, will have a set of names of tables one of which must be empty if the view can be created. It will also have an error message. @param mvh...
[ "Check", "a", "MaterializedViewHandlerInfo", "object", "for", "safety", ".", "Return", "an", "object", "with", "table", "population", "requirements", "on", "the", "table", "for", "it", "to", "be", "allowed", ".", "The", "return", "object", "if", "it", "is", ...
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/catgen/in/javasrc/CatalogDiffEngine.java#L837-L851
62,215
VoltDB/voltdb
src/catgen/in/javasrc/CatalogDiffEngine.java
CatalogDiffEngine.writeModification
private void writeModification(CatalogType newType, CatalogType prevType, String field) { // Don't write modifications if the field can be ignored if (checkModifyIgnoreList(newType, prevType, field)) { return; } // verify this is possible, write an error and mark return ...
java
private void writeModification(CatalogType newType, CatalogType prevType, String field) { // Don't write modifications if the field can be ignored if (checkModifyIgnoreList(newType, prevType, field)) { return; } // verify this is possible, write an error and mark return ...
[ "private", "void", "writeModification", "(", "CatalogType", "newType", ",", "CatalogType", "prevType", ",", "String", "field", ")", "{", "// Don't write modifications if the field can be ignored", "if", "(", "checkModifyIgnoreList", "(", "newType", ",", "prevType", ",", ...
Add a modification
[ "Add", "a", "modification" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/catgen/in/javasrc/CatalogDiffEngine.java#L1298-L1332
62,216
VoltDB/voltdb
src/catgen/in/javasrc/CatalogDiffEngine.java
CatalogDiffEngine.checkCatalogDiffShouldApplyToEE
protected static boolean checkCatalogDiffShouldApplyToEE(final CatalogType suspect) { // Warning: // This check list should be consistent with catalog items defined in EE // Once a new catalog type is added in EE, we should add it here. if (suspect instanceof Cluster || suspect inst...
java
protected static boolean checkCatalogDiffShouldApplyToEE(final CatalogType suspect) { // Warning: // This check list should be consistent with catalog items defined in EE // Once a new catalog type is added in EE, we should add it here. if (suspect instanceof Cluster || suspect inst...
[ "protected", "static", "boolean", "checkCatalogDiffShouldApplyToEE", "(", "final", "CatalogType", "suspect", ")", "{", "// Warning:", "// This check list should be consistent with catalog items defined in EE", "// Once a new catalog type is added in EE, we should add it here.", "if", "("...
Our EE has a list of Catalog items that are in use, but Java catalog contains much more. Some of the catalog diff commands will only be useful to Java. So this function will decide whether the @param suspect catalog item will be used in EE or not. @param suspect @param prevType @param field @return true if the suspect ...
[ "Our", "EE", "has", "a", "list", "of", "Catalog", "items", "that", "are", "in", "use", "but", "Java", "catalog", "contains", "much", "more", ".", "Some", "of", "the", "catalog", "diff", "commands", "will", "only", "be", "useful", "to", "Java", ".", "So...
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/catgen/in/javasrc/CatalogDiffEngine.java#L1343-L1390
62,217
VoltDB/voltdb
src/catgen/in/javasrc/CatalogDiffEngine.java
CatalogDiffEngine.processModifyResponses
private void processModifyResponses(String errorMessage, List<TablePopulationRequirements> responseList) { assert(errorMessage != null); // if no requirements, then it's just not possible if (responseList == null) { m_supported = false; m_errors.append(errorMessage + "\n...
java
private void processModifyResponses(String errorMessage, List<TablePopulationRequirements> responseList) { assert(errorMessage != null); // if no requirements, then it's just not possible if (responseList == null) { m_supported = false; m_errors.append(errorMessage + "\n...
[ "private", "void", "processModifyResponses", "(", "String", "errorMessage", ",", "List", "<", "TablePopulationRequirements", ">", "responseList", ")", "{", "assert", "(", "errorMessage", "!=", "null", ")", ";", "// if no requirements, then it's just not possible", "if", ...
After we decide we can't modify, add or delete something on a full table, we do a check to see if we can do that on an empty table. The original error and any response from the empty table check is processed here. This code is basically in this method so it's not repeated 3 times for modify, add and delete. See where i...
[ "After", "we", "decide", "we", "can", "t", "modify", "add", "or", "delete", "something", "on", "a", "full", "table", "we", "do", "a", "check", "to", "see", "if", "we", "can", "do", "that", "on", "an", "empty", "table", ".", "The", "original", "error"...
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/catgen/in/javasrc/CatalogDiffEngine.java#L1403-L1428
62,218
VoltDB/voltdb
src/catgen/in/javasrc/CatalogDiffEngine.java
CatalogDiffEngine.writeDeletion
private void writeDeletion(CatalogType prevType, CatalogType newlyChildlessParent, String mapName) { // Don't write deletions if the field can be ignored if (checkDeleteIgnoreList(prevType, newlyChildlessParent, mapName, prevType.getTypeName())) { return; } // verify thi...
java
private void writeDeletion(CatalogType prevType, CatalogType newlyChildlessParent, String mapName) { // Don't write deletions if the field can be ignored if (checkDeleteIgnoreList(prevType, newlyChildlessParent, mapName, prevType.getTypeName())) { return; } // verify thi...
[ "private", "void", "writeDeletion", "(", "CatalogType", "prevType", ",", "CatalogType", "newlyChildlessParent", ",", "String", "mapName", ")", "{", "// Don't write deletions if the field can be ignored", "if", "(", "checkDeleteIgnoreList", "(", "prevType", ",", "newlyChildl...
Add a deletion
[ "Add", "a", "deletion" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/catgen/in/javasrc/CatalogDiffEngine.java#L1433-L1464
62,219
VoltDB/voltdb
src/catgen/in/javasrc/CatalogDiffEngine.java
CatalogDiffEngine.writeAddition
private void writeAddition(CatalogType newType) { // Don't write additions if the field can be ignored if (checkAddIgnoreList(newType)) { return; } // verify this is possible, write an error and mark return code false if so String errorMessage = checkAddDropWhitelist(...
java
private void writeAddition(CatalogType newType) { // Don't write additions if the field can be ignored if (checkAddIgnoreList(newType)) { return; } // verify this is possible, write an error and mark return code false if so String errorMessage = checkAddDropWhitelist(...
[ "private", "void", "writeAddition", "(", "CatalogType", "newType", ")", "{", "// Don't write additions if the field can be ignored", "if", "(", "checkAddIgnoreList", "(", "newType", ")", ")", "{", "return", ";", "}", "// verify this is possible, write an error and mark return...
Add an addition
[ "Add", "an", "addition" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/catgen/in/javasrc/CatalogDiffEngine.java#L1469-L1499
62,220
VoltDB/voltdb
src/catgen/in/javasrc/CatalogDiffEngine.java
CatalogDiffEngine.getCommandsToDiff
private void getCommandsToDiff(String mapName, CatalogMap<? extends CatalogType> prevMap, CatalogMap<? extends CatalogType> newMap) { assert(prevMap != null); assert(newMap != null); // in previous, not in new for...
java
private void getCommandsToDiff(String mapName, CatalogMap<? extends CatalogType> prevMap, CatalogMap<? extends CatalogType> newMap) { assert(prevMap != null); assert(newMap != null); // in previous, not in new for...
[ "private", "void", "getCommandsToDiff", "(", "String", "mapName", ",", "CatalogMap", "<", "?", "extends", "CatalogType", ">", "prevMap", ",", "CatalogMap", "<", "?", "extends", "CatalogType", ">", "newMap", ")", "{", "assert", "(", "prevMap", "!=", "null", "...
Check if all the children in prevMap are present and identical in newMap. Then, check if anything is in newMap that isn't in prevMap. @param mapName @param prevMap @param newMap
[ "Check", "if", "all", "the", "children", "in", "prevMap", "are", "present", "and", "identical", "in", "newMap", ".", "Then", "check", "if", "anything", "is", "in", "newMap", "that", "isn", "t", "in", "prevMap", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/catgen/in/javasrc/CatalogDiffEngine.java#L1668-L1693
62,221
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/Expression.java
Expression.getSQL
public String getSQL() { StringBuffer sb = new StringBuffer(64); switch (opType) { case OpTypes.VALUE : if (valueData == null) { return Tokens.T_NULL; } return dataType.convertToSQLString(valueData); case Op...
java
public String getSQL() { StringBuffer sb = new StringBuffer(64); switch (opType) { case OpTypes.VALUE : if (valueData == null) { return Tokens.T_NULL; } return dataType.convertToSQLString(valueData); case Op...
[ "public", "String", "getSQL", "(", ")", "{", "StringBuffer", "sb", "=", "new", "StringBuffer", "(", "64", ")", ";", "switch", "(", "opType", ")", "{", "case", "OpTypes", ".", "VALUE", ":", "if", "(", "valueData", "==", "null", ")", "{", "return", "To...
For use with CHECK constraints. Under development. Currently supports a subset of expressions and is suitable for CHECK search conditions that refer only to the inserted/updated row. For full DDL reporting of VIEW select queries and CHECK search conditions, future improvements here are dependent upon improvements to ...
[ "For", "use", "with", "CHECK", "constraints", ".", "Under", "development", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/Expression.java#L298-L355
62,222
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/Expression.java
Expression.setDataType
void setDataType(Session session, Type type) { if (opType == OpTypes.VALUE) { valueData = type.convertToType(session, valueData, dataType); } dataType = type; }
java
void setDataType(Session session, Type type) { if (opType == OpTypes.VALUE) { valueData = type.convertToType(session, valueData, dataType); } dataType = type; }
[ "void", "setDataType", "(", "Session", "session", ",", "Type", "type", ")", "{", "if", "(", "opType", "==", "OpTypes", ".", "VALUE", ")", "{", "valueData", "=", "type", ".", "convertToType", "(", "session", ",", "valueData", ",", "dataType", ")", ";", ...
Set the data type
[ "Set", "the", "data", "type" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/Expression.java#L417-L424
62,223
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/Expression.java
Expression.replaceAliasInOrderBy
Expression replaceAliasInOrderBy(Expression[] columns, int length) { for (int i = 0; i < nodes.length; i++) { if (nodes[i] == null) { continue; } nodes[i] = nodes[i].replaceAliasInOrderBy(columns, length); } return this; }
java
Expression replaceAliasInOrderBy(Expression[] columns, int length) { for (int i = 0; i < nodes.length; i++) { if (nodes[i] == null) { continue; } nodes[i] = nodes[i].replaceAliasInOrderBy(columns, length); } return this; }
[ "Expression", "replaceAliasInOrderBy", "(", "Expression", "[", "]", "columns", ",", "int", "length", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "nodes", ".", "length", ";", "i", "++", ")", "{", "if", "(", "nodes", "[", "i", "]", "...
return the expression for an alias used in an ORDER BY clause
[ "return", "the", "expression", "for", "an", "alias", "used", "in", "an", "ORDER", "BY", "clause" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/Expression.java#L804-L815
62,224
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/Expression.java
Expression.resolveColumnReferences
public HsqlList resolveColumnReferences(RangeVariable[] rangeVarArray, HsqlList unresolvedSet) { return resolveColumnReferences(rangeVarArray, rangeVarArray.length, unresolvedSet, true); }
java
public HsqlList resolveColumnReferences(RangeVariable[] rangeVarArray, HsqlList unresolvedSet) { return resolveColumnReferences(rangeVarArray, rangeVarArray.length, unresolvedSet, true); }
[ "public", "HsqlList", "resolveColumnReferences", "(", "RangeVariable", "[", "]", "rangeVarArray", ",", "HsqlList", "unresolvedSet", ")", "{", "return", "resolveColumnReferences", "(", "rangeVarArray", ",", "rangeVarArray", ".", "length", ",", "unresolvedSet", ",", "tr...
resolve tables and collect unresolved column expressions
[ "resolve", "tables", "and", "collect", "unresolved", "column", "expressions" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/Expression.java#L892-L896
62,225
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/Expression.java
Expression.insertValuesIntoSubqueryTable
void insertValuesIntoSubqueryTable(Session session, PersistentStore store) { for (int i = 0; i < nodes.length; i++) { Object[] data = nodes[i].getRowValue(session); for (int j = 0; j < nodeDataTypes.length; j++) { data[j] = nodeData...
java
void insertValuesIntoSubqueryTable(Session session, PersistentStore store) { for (int i = 0; i < nodes.length; i++) { Object[] data = nodes[i].getRowValue(session); for (int j = 0; j < nodeDataTypes.length; j++) { data[j] = nodeData...
[ "void", "insertValuesIntoSubqueryTable", "(", "Session", "session", ",", "PersistentStore", "store", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "nodes", ".", "length", ";", "i", "++", ")", "{", "Object", "[", "]", "data", "=", "nodes", ...
Details of IN condition optimisation for 1.9.0 Predicates with SELECT are QUERY expressions Predicates with IN list Parser adds a SubQuery to the list for each predicate At type resolution IN lists that are entirely fixed constant or parameter values are selected for possible optimisation. The flags: IN expression r...
[ "Details", "of", "IN", "condition", "optimisation", "for", "1", ".", "9", ".", "0", "Predicates", "with", "SELECT", "are", "QUERY", "expressions" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/Expression.java#L1160-L1178
62,226
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/Expression.java
Expression.getCheckSelect
static QuerySpecification getCheckSelect(Session session, Table t, Expression e) { CompileContext compileContext = new CompileContext(session); QuerySpecification s = new QuerySpecification(compileContext); s.exprColumns = new Expression[1]; s.exprColumns[0] = EXPR_T...
java
static QuerySpecification getCheckSelect(Session session, Table t, Expression e) { CompileContext compileContext = new CompileContext(session); QuerySpecification s = new QuerySpecification(compileContext); s.exprColumns = new Expression[1]; s.exprColumns[0] = EXPR_T...
[ "static", "QuerySpecification", "getCheckSelect", "(", "Session", "session", ",", "Table", "t", ",", "Expression", "e", ")", "{", "CompileContext", "compileContext", "=", "new", "CompileContext", "(", "session", ")", ";", "QuerySpecification", "s", "=", "new", "...
Returns a Select object that can be used for checking the contents of an existing table against the given CHECK search condition.
[ "Returns", "a", "Select", "object", "that", "can", "be", "used", "for", "checking", "the", "contents", "of", "an", "existing", "table", "against", "the", "given", "CHECK", "search", "condition", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/Expression.java#L1328-L1360
62,227
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/Expression.java
Expression.collectAllExpressions
static void collectAllExpressions(HsqlList set, Expression e, OrderedIntHashSet typeSet, OrderedIntHashSet stopAtTypeSet) { if (e == null) { return; } if (stopAtTypeSet.contains(e.opType)) { ret...
java
static void collectAllExpressions(HsqlList set, Expression e, OrderedIntHashSet typeSet, OrderedIntHashSet stopAtTypeSet) { if (e == null) { return; } if (stopAtTypeSet.contains(e.opType)) { ret...
[ "static", "void", "collectAllExpressions", "(", "HsqlList", "set", ",", "Expression", "e", ",", "OrderedIntHashSet", "typeSet", ",", "OrderedIntHashSet", "stopAtTypeSet", ")", "{", "if", "(", "e", "==", "null", ")", "{", "return", ";", "}", "if", "(", "stopA...
collect all extrassions of a set of expression types appearing anywhere in a select statement and its subselects, etc.
[ "collect", "all", "extrassions", "of", "a", "set", "of", "expression", "types", "appearing", "anywhere", "in", "a", "select", "statement", "and", "its", "subselects", "etc", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/Expression.java#L1390-L1414
62,228
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/Expression.java
Expression.getUniqueId
protected String getUniqueId(final Session session) { if (cached_id != null) { return cached_id; } // // Calculated an new Id // // this line ripped from the "describe" method // seems to help with some types like "equal" cached_id = new Stri...
java
protected String getUniqueId(final Session session) { if (cached_id != null) { return cached_id; } // // Calculated an new Id // // this line ripped from the "describe" method // seems to help with some types like "equal" cached_id = new Stri...
[ "protected", "String", "getUniqueId", "(", "final", "Session", "session", ")", "{", "if", "(", "cached_id", "!=", "null", ")", "{", "return", "cached_id", ";", "}", "//", "// Calculated an new Id", "//", "// this line ripped from the \"describe\" method", "// seems to...
Get the hex address of this Expression Object in memory, to be used as a unique identifier. @return The hex address of the pointer to this object.
[ "Get", "the", "hex", "address", "of", "this", "Expression", "Object", "in", "memory", "to", "be", "used", "as", "a", "unique", "identifier", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/Expression.java#L1982-L2009
62,229
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/Expression.java
Expression.convertUsingColumnrefToCoaleseExpression
private VoltXMLElement convertUsingColumnrefToCoaleseExpression(Session session, VoltXMLElement exp, Type dataType) throws org.hsqldb_voltpatches.HSQLInterface.HSQLParseException { // Hsql has check dataType can not be null. assert(dataType != null); exp.attributes.put("valuetype", d...
java
private VoltXMLElement convertUsingColumnrefToCoaleseExpression(Session session, VoltXMLElement exp, Type dataType) throws org.hsqldb_voltpatches.HSQLInterface.HSQLParseException { // Hsql has check dataType can not be null. assert(dataType != null); exp.attributes.put("valuetype", d...
[ "private", "VoltXMLElement", "convertUsingColumnrefToCoaleseExpression", "(", "Session", "session", ",", "VoltXMLElement", "exp", ",", "Type", "dataType", ")", "throws", "org", ".", "hsqldb_voltpatches", ".", "HSQLInterface", ".", "HSQLParseException", "{", "// Hsql has c...
columnref T1.C
[ "columnref", "T1", ".", "C" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/Expression.java#L2040-L2115
62,230
VoltDB/voltdb
third_party/java/src/org/apache/commons_voltpatches/cli/HelpFormatter.java
HelpFormatter.appendOptionGroup
private void appendOptionGroup(StringBuffer buff, OptionGroup group) { if (!group.isRequired()) { buff.append("["); } List<Option> optList = new ArrayList<Option>(group.getOptions()); if (getOptionComparator() != null) { Collections.sort(optLi...
java
private void appendOptionGroup(StringBuffer buff, OptionGroup group) { if (!group.isRequired()) { buff.append("["); } List<Option> optList = new ArrayList<Option>(group.getOptions()); if (getOptionComparator() != null) { Collections.sort(optLi...
[ "private", "void", "appendOptionGroup", "(", "StringBuffer", "buff", ",", "OptionGroup", "group", ")", "{", "if", "(", "!", "group", ".", "isRequired", "(", ")", ")", "{", "buff", ".", "append", "(", "\"[\"", ")", ";", "}", "List", "<", "Option", ">", ...
Appends the usage clause for an OptionGroup to a StringBuffer. The clause is wrapped in square brackets if the group is required. The display of the options is handled by appendOption @param buff the StringBuffer to append to @param group the group to append @see #appendOption(StringBuffer,Option,boolean)
[ "Appends", "the", "usage", "clause", "for", "an", "OptionGroup", "to", "a", "StringBuffer", ".", "The", "clause", "is", "wrapped", "in", "square", "brackets", "if", "the", "group", "is", "required", ".", "The", "display", "of", "the", "options", "is", "han...
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/third_party/java/src/org/apache/commons_voltpatches/cli/HelpFormatter.java#L644-L672
62,231
VoltDB/voltdb
third_party/java/src/org/apache/commons_voltpatches/cli/HelpFormatter.java
HelpFormatter.appendOption
private void appendOption(StringBuffer buff, Option option, boolean required) { if (!required) { buff.append("["); } if (option.getOpt() != null) { buff.append("-").append(option.getOpt()); } else { buff.append("--"...
java
private void appendOption(StringBuffer buff, Option option, boolean required) { if (!required) { buff.append("["); } if (option.getOpt() != null) { buff.append("-").append(option.getOpt()); } else { buff.append("--"...
[ "private", "void", "appendOption", "(", "StringBuffer", "buff", ",", "Option", "option", ",", "boolean", "required", ")", "{", "if", "(", "!", "required", ")", "{", "buff", ".", "append", "(", "\"[\"", ")", ";", "}", "if", "(", "option", ".", "getOpt",...
Appends the usage clause for an Option to a StringBuffer. @param buff the StringBuffer to append to @param option the Option to append @param required whether the Option is required or not
[ "Appends", "the", "usage", "clause", "for", "an", "Option", "to", "a", "StringBuffer", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/third_party/java/src/org/apache/commons_voltpatches/cli/HelpFormatter.java#L681-L709
62,232
VoltDB/voltdb
third_party/java/src/org/apache/commons_voltpatches/cli/HelpFormatter.java
HelpFormatter.printUsage
public void printUsage(PrintWriter pw, int width, String cmdLineSyntax) { int argPos = cmdLineSyntax.indexOf(' ') + 1; printWrapped(pw, width, getSyntaxPrefix().length() + argPos, getSyntaxPrefix() + cmdLineSyntax); }
java
public void printUsage(PrintWriter pw, int width, String cmdLineSyntax) { int argPos = cmdLineSyntax.indexOf(' ') + 1; printWrapped(pw, width, getSyntaxPrefix().length() + argPos, getSyntaxPrefix() + cmdLineSyntax); }
[ "public", "void", "printUsage", "(", "PrintWriter", "pw", ",", "int", "width", ",", "String", "cmdLineSyntax", ")", "{", "int", "argPos", "=", "cmdLineSyntax", ".", "indexOf", "(", "'", "'", ")", "+", "1", ";", "printWrapped", "(", "pw", ",", "width", ...
Print the cmdLineSyntax to the specified writer, using the specified width. @param pw The printWriter to write the help to @param width The number of characters per line for the usage statement. @param cmdLineSyntax The usage statement.
[ "Print", "the", "cmdLineSyntax", "to", "the", "specified", "writer", "using", "the", "specified", "width", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/third_party/java/src/org/apache/commons_voltpatches/cli/HelpFormatter.java#L719-L724
62,233
VoltDB/voltdb
third_party/java/src/org/apache/commons_voltpatches/cli/HelpFormatter.java
HelpFormatter.renderOptions
protected StringBuffer renderOptions(StringBuffer sb, int width, Options options, int leftPad, int descPad) { final String lpad = createPadding(leftPad); final String dpad = createPadding(descPad); // first create list containing only <lpad>-a,--aaa where // -a is opt and --aaa is ...
java
protected StringBuffer renderOptions(StringBuffer sb, int width, Options options, int leftPad, int descPad) { final String lpad = createPadding(leftPad); final String dpad = createPadding(descPad); // first create list containing only <lpad>-a,--aaa where // -a is opt and --aaa is ...
[ "protected", "StringBuffer", "renderOptions", "(", "StringBuffer", "sb", ",", "int", "width", ",", "Options", "options", ",", "int", "leftPad", ",", "int", "descPad", ")", "{", "final", "String", "lpad", "=", "createPadding", "(", "leftPad", ")", ";", "final...
Render the specified Options and return the rendered Options in a StringBuffer. @param sb The StringBuffer to place the rendered Options into. @param width The number of characters to display per line @param options The command line Options @param leftPad the number of characters of padding to be prefixed to each line...
[ "Render", "the", "specified", "Options", "and", "return", "the", "rendered", "Options", "in", "a", "StringBuffer", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/third_party/java/src/org/apache/commons_voltpatches/cli/HelpFormatter.java#L791-L877
62,234
VoltDB/voltdb
third_party/java/src/org/apache/commons_voltpatches/cli/HelpFormatter.java
HelpFormatter.renderWrappedText
protected StringBuffer renderWrappedText(StringBuffer sb, int width, int nextLineTabStop, String text) { int pos = findWrapPos(text, width, 0); if (pos == -1) { sb.append(rtrim(text)); return sb; } sb.app...
java
protected StringBuffer renderWrappedText(StringBuffer sb, int width, int nextLineTabStop, String text) { int pos = findWrapPos(text, width, 0); if (pos == -1) { sb.append(rtrim(text)); return sb; } sb.app...
[ "protected", "StringBuffer", "renderWrappedText", "(", "StringBuffer", "sb", ",", "int", "width", ",", "int", "nextLineTabStop", ",", "String", "text", ")", "{", "int", "pos", "=", "findWrapPos", "(", "text", ",", "width", ",", "0", ")", ";", "if", "(", ...
Render the specified text and return the rendered Options in a StringBuffer. @param sb The StringBuffer to place the rendered text into. @param width The number of characters to display per line @param nextLineTabStop The position on the next line for the first tab. @param text The text to be rendered. @return the St...
[ "Render", "the", "specified", "text", "and", "return", "the", "rendered", "Options", "in", "a", "StringBuffer", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/third_party/java/src/org/apache/commons_voltpatches/cli/HelpFormatter.java#L890-L931
62,235
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/FunctionForVoltDB.java
FunctionForVoltDB.functionMatches
private static boolean functionMatches(FunctionDescriptor existingFd, Type returnType, Type[] parameterTypes) { if (returnType != existingFd.m_type) { return false; } if (parameterTypes.length != ex...
java
private static boolean functionMatches(FunctionDescriptor existingFd, Type returnType, Type[] parameterTypes) { if (returnType != existingFd.m_type) { return false; } if (parameterTypes.length != ex...
[ "private", "static", "boolean", "functionMatches", "(", "FunctionDescriptor", "existingFd", ",", "Type", "returnType", ",", "Type", "[", "]", "parameterTypes", ")", "{", "if", "(", "returnType", "!=", "existingFd", ".", "m_type", ")", "{", "return", "false", "...
Return true iff the existing function descriptor matches the given return type and parameter types. These are all HSQLDB types, not Volt types. @param existingFd @param returnType @param parameterTypes @return
[ "Return", "true", "iff", "the", "existing", "function", "descriptor", "matches", "the", "given", "return", "type", "and", "parameter", "types", ".", "These", "are", "all", "HSQLDB", "types", "not", "Volt", "types", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/FunctionForVoltDB.java#L928-L943
62,236
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/FunctionForVoltDB.java
FunctionForVoltDB.findFunction
private static FunctionDescriptor findFunction(String functionName, Type returnType, Type[] parameterType) { m_logger.debug("Looking for UDF " + functionName); FunctionDescriptor fd = FunctionDescriptor...
java
private static FunctionDescriptor findFunction(String functionName, Type returnType, Type[] parameterType) { m_logger.debug("Looking for UDF " + functionName); FunctionDescriptor fd = FunctionDescriptor...
[ "private", "static", "FunctionDescriptor", "findFunction", "(", "String", "functionName", ",", "Type", "returnType", ",", "Type", "[", "]", "parameterType", ")", "{", "m_logger", ".", "debug", "(", "\"Looking for UDF \"", "+", "functionName", ")", ";", "FunctionDe...
Given a function name and signature, find if there is an existing definition or saved defintion which matches the name and signature, and return the definition. @param functionName @param returnType @param parameterType @return The matching definition, or null if there is no matching definition.
[ "Given", "a", "function", "name", "and", "signature", "find", "if", "there", "is", "an", "existing", "definition", "or", "saved", "defintion", "which", "matches", "the", "name", "and", "signature", "and", "return", "the", "definition", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/FunctionForVoltDB.java#L955-L970
62,237
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/FunctionForVoltDB.java
FunctionForVoltDB.registerTokenForUDF
public static synchronized int registerTokenForUDF(String functionName, int functionId, VoltType voltReturnType, VoltType[] voltParameterTypes) { i...
java
public static synchronized int registerTokenForUDF(String functionName, int functionId, VoltType voltReturnType, VoltType[] voltParameterTypes) { i...
[ "public", "static", "synchronized", "int", "registerTokenForUDF", "(", "String", "functionName", ",", "int", "functionId", ",", "VoltType", "voltReturnType", ",", "VoltType", "[", "]", "voltParameterTypes", ")", "{", "int", "retFunctionId", ";", "Type", "hsqlReturnT...
This function registers a UDF using VoltType values for the return type and parameter types. @param functionName The function name. @param functionId The function id. If this is -1 we don't have an opinion about the value. @param voltReturnType The return type as a VoltType enumeration. @param voltParameterTypes The...
[ "This", "function", "registers", "a", "UDF", "using", "VoltType", "values", "for", "the", "return", "type", "and", "parameter", "types", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/FunctionForVoltDB.java#L1005-L1049
62,238
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/FunctionForVoltDB.java
FunctionForVoltDB.hsqlTypeFromVoltType
public static Type hsqlTypeFromVoltType(VoltType voltReturnType) { Class<?> typeClass = VoltType.classFromByteValue(voltReturnType.getValue()); int typeNo = Types.getParameterSQLTypeNumber(typeClass); return Type.getDefaultTypeWithSize(typeNo); }
java
public static Type hsqlTypeFromVoltType(VoltType voltReturnType) { Class<?> typeClass = VoltType.classFromByteValue(voltReturnType.getValue()); int typeNo = Types.getParameterSQLTypeNumber(typeClass); return Type.getDefaultTypeWithSize(typeNo); }
[ "public", "static", "Type", "hsqlTypeFromVoltType", "(", "VoltType", "voltReturnType", ")", "{", "Class", "<", "?", ">", "typeClass", "=", "VoltType", ".", "classFromByteValue", "(", "voltReturnType", ".", "getValue", "(", ")", ")", ";", "int", "typeNo", "=", ...
Convert a VoltType to an HSQL type. Types are somewhat confusing. There are three type representations, all different. <ol> <li> Some types are in HSQL. These are enumerals of the type org.hsqldb_voltpatches.types.Type.</li> <li> Some types are in VoltDB. These are enumerals of the type org.voltdb.VoltType.</li> <l...
[ "Convert", "a", "VoltType", "to", "an", "HSQL", "type", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/FunctionForVoltDB.java#L1069-L1073
62,239
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/FunctionForVoltDB.java
FunctionForVoltDB.hsqlTypeFromVoltType
public static Type[] hsqlTypeFromVoltType(VoltType[] voltParameterTypes) { Type[] answer = new Type[voltParameterTypes.length]; for (int idx = 0; idx < voltParameterTypes.length; idx++) { answer[idx] = hsqlTypeFromVoltType(voltParameterTypes[idx]); } return answer; }
java
public static Type[] hsqlTypeFromVoltType(VoltType[] voltParameterTypes) { Type[] answer = new Type[voltParameterTypes.length]; for (int idx = 0; idx < voltParameterTypes.length; idx++) { answer[idx] = hsqlTypeFromVoltType(voltParameterTypes[idx]); } return answer; }
[ "public", "static", "Type", "[", "]", "hsqlTypeFromVoltType", "(", "VoltType", "[", "]", "voltParameterTypes", ")", "{", "Type", "[", "]", "answer", "=", "new", "Type", "[", "voltParameterTypes", ".", "length", "]", ";", "for", "(", "int", "idx", "=", "0...
Map the single parameter hsqlTypeFromVoltType over an array. @param voltParameterTypes @return
[ "Map", "the", "single", "parameter", "hsqlTypeFromVoltType", "over", "an", "array", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/FunctionForVoltDB.java#L1081-L1087
62,240
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/RowAVLDiskData.java
RowAVLDiskData.setNewNodes
void setNewNodes() { int index = tTable.getIndexCount(); nPrimaryNode = new NodeAVLMemoryPointer(this); NodeAVL n = nPrimaryNode; for (int i = 1; i < index; i++) { n.nNext = new NodeAVLMemoryPointer(this); n = n.nNext; } }
java
void setNewNodes() { int index = tTable.getIndexCount(); nPrimaryNode = new NodeAVLMemoryPointer(this); NodeAVL n = nPrimaryNode; for (int i = 1; i < index; i++) { n.nNext = new NodeAVLMemoryPointer(this); n = n.nNext; } }
[ "void", "setNewNodes", "(", ")", "{", "int", "index", "=", "tTable", ".", "getIndexCount", "(", ")", ";", "nPrimaryNode", "=", "new", "NodeAVLMemoryPointer", "(", "this", ")", ";", "NodeAVL", "n", "=", "nPrimaryNode", ";", "for", "(", "int", "i", "=", ...
Used when data is read from the disk into the Cache the first time. New Nodes are created which are then indexed.
[ "Used", "when", "data", "is", "read", "from", "the", "disk", "into", "the", "Cache", "the", "first", "time", ".", "New", "Nodes", "are", "created", "which", "are", "then", "indexed", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/RowAVLDiskData.java#L85-L97
62,241
VoltDB/voltdb
src/frontend/org/voltdb/rejoin/TaskLogImpl.java
TaskLogImpl.bufferCatchup
private void bufferCatchup(int messageSize) throws IOException { // If the current buffer has too many tasks logged, queue it and // create a new one. if (m_tail != null && m_tail.size() > 0 && messageSize > m_bufferHeadroom) { // compile the invocation buffer m_tail.comp...
java
private void bufferCatchup(int messageSize) throws IOException { // If the current buffer has too many tasks logged, queue it and // create a new one. if (m_tail != null && m_tail.size() > 0 && messageSize > m_bufferHeadroom) { // compile the invocation buffer m_tail.comp...
[ "private", "void", "bufferCatchup", "(", "int", "messageSize", ")", "throws", "IOException", "{", "// If the current buffer has too many tasks logged, queue it and", "// create a new one.", "if", "(", "m_tail", "!=", "null", "&&", "m_tail", ".", "size", "(", ")", ">", ...
The buffers are bound by the number of tasks in them. Once the current buffer has enough tasks, it will be queued and a new buffer will be created. @throws IOException
[ "The", "buffers", "are", "bound", "by", "the", "number", "of", "tasks", "in", "them", ".", "Once", "the", "current", "buffer", "has", "enough", "tasks", "it", "will", "be", "queued", "and", "a", "new", "buffer", "will", "be", "created", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/rejoin/TaskLogImpl.java#L94-L130
62,242
VoltDB/voltdb
src/frontend/org/voltdb/rejoin/TaskLogImpl.java
TaskLogImpl.getNextMessage
@Override public TransactionInfoBaseMessage getNextMessage() throws IOException { if (m_closed) { throw new IOException("Closed"); } if (m_head == null) { // Get another buffer asynchronously final Runnable r = new Runnable() { @Override ...
java
@Override public TransactionInfoBaseMessage getNextMessage() throws IOException { if (m_closed) { throw new IOException("Closed"); } if (m_head == null) { // Get another buffer asynchronously final Runnable r = new Runnable() { @Override ...
[ "@", "Override", "public", "TransactionInfoBaseMessage", "getNextMessage", "(", ")", "throws", "IOException", "{", "if", "(", "m_closed", ")", "{", "throw", "new", "IOException", "(", "\"Closed\"", ")", ";", "}", "if", "(", "m_head", "==", "null", ")", "{", ...
Try to get the next task message from the queue. @return the next task message. null will be returned if either the next task message is not ready or the queue is empty now. @throws IOException If failed to pull the next message out of the queue.
[ "Try", "to", "get", "the", "next", "task", "message", "from", "the", "queue", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/rejoin/TaskLogImpl.java#L171-L236
62,243
VoltDB/voltdb
third_party/java/src/org/apache/zookeeper_voltpatches/server/NIOServerCnxn.java
NIOServerCnxn.sendBufferSync
void sendBufferSync(ByteBuffer bb) { try { /* configure socket to be blocking * so that we dont have to do write in * a tight while loop */ sock.configureBlocking(true); if (bb != closeConn) { if (sock != null) { ...
java
void sendBufferSync(ByteBuffer bb) { try { /* configure socket to be blocking * so that we dont have to do write in * a tight while loop */ sock.configureBlocking(true); if (bb != closeConn) { if (sock != null) { ...
[ "void", "sendBufferSync", "(", "ByteBuffer", "bb", ")", "{", "try", "{", "/* configure socket to be blocking\n * so that we dont have to do write in\n * a tight while loop\n */", "sock", ".", "configureBlocking", "(", "true", ")", ";", "if", "(", ...
send buffer without using the asynchronous calls to selector and then close the socket @param bb
[ "send", "buffer", "without", "using", "the", "asynchronous", "calls", "to", "selector", "and", "then", "close", "the", "socket" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/third_party/java/src/org/apache/zookeeper_voltpatches/server/NIOServerCnxn.java#L407-L423
62,244
VoltDB/voltdb
third_party/java/src/org/apache/zookeeper_voltpatches/server/NIOServerCnxn.java
NIOServerCnxn.cleanupWriterSocket
private void cleanupWriterSocket(PrintWriter pwriter) { try { if (pwriter != null) { pwriter.flush(); pwriter.close(); } } catch (Exception e) { LOG.info("Error closing PrintWriter ", e); } finally { try { ...
java
private void cleanupWriterSocket(PrintWriter pwriter) { try { if (pwriter != null) { pwriter.flush(); pwriter.close(); } } catch (Exception e) { LOG.info("Error closing PrintWriter ", e); } finally { try { ...
[ "private", "void", "cleanupWriterSocket", "(", "PrintWriter", "pwriter", ")", "{", "try", "{", "if", "(", "pwriter", "!=", "null", ")", "{", "pwriter", ".", "flush", "(", ")", ";", "pwriter", ".", "close", "(", ")", ";", "}", "}", "catch", "(", "Exce...
clean up the socket related to a command and also make sure we flush the data before we do that @param pwriter the pwriter for a command socket
[ "clean", "up", "the", "socket", "related", "to", "a", "command", "and", "also", "make", "sure", "we", "flush", "the", "data", "before", "we", "do", "that" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/third_party/java/src/org/apache/zookeeper_voltpatches/server/NIOServerCnxn.java#L931-L946
62,245
VoltDB/voltdb
third_party/java/src/org/apache/zookeeper_voltpatches/server/NIOServerCnxn.java
NIOServerCnxn.readLength
private boolean readLength(SelectionKey k) throws IOException { // Read the length, now get the buffer int len = lenBuffer.getInt(); if (!initialized && checkFourLetterWord(k, len)) { return false; } if (len < 0 || len > BinaryInputArchive.maxBuffer) { thr...
java
private boolean readLength(SelectionKey k) throws IOException { // Read the length, now get the buffer int len = lenBuffer.getInt(); if (!initialized && checkFourLetterWord(k, len)) { return false; } if (len < 0 || len > BinaryInputArchive.maxBuffer) { thr...
[ "private", "boolean", "readLength", "(", "SelectionKey", "k", ")", "throws", "IOException", "{", "// Read the length, now get the buffer", "int", "len", "=", "lenBuffer", ".", "getInt", "(", ")", ";", "if", "(", "!", "initialized", "&&", "checkFourLetterWord", "("...
Reads the first 4 bytes of lenBuffer, which could be true length or four letter word. @param k selection key @return true if length read, otw false (wasn't really the length) @throws IOException if buffer size exceeds maxBuffer size
[ "Reads", "the", "first", "4", "bytes", "of", "lenBuffer", "which", "could", "be", "true", "length", "or", "four", "letter", "word", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/third_party/java/src/org/apache/zookeeper_voltpatches/server/NIOServerCnxn.java#L1332-L1346
62,246
VoltDB/voltdb
third_party/java/src/org/apache/zookeeper_voltpatches/server/NIOServerCnxn.java
NIOServerCnxn.closeSock
private void closeSock() { if (sock == null) { return; } LOG.debug("Closed socket connection for client " + sock.socket().getRemoteSocketAddress() + (sessionId != 0 ? " which had sessionid 0x" + Long.toHexString(sessionId) : ...
java
private void closeSock() { if (sock == null) { return; } LOG.debug("Closed socket connection for client " + sock.socket().getRemoteSocketAddress() + (sessionId != 0 ? " which had sessionid 0x" + Long.toHexString(sessionId) : ...
[ "private", "void", "closeSock", "(", ")", "{", "if", "(", "sock", "==", "null", ")", "{", "return", ";", "}", "LOG", ".", "debug", "(", "\"Closed socket connection for client \"", "+", "sock", ".", "socket", "(", ")", ".", "getRemoteSocketAddress", "(", ")...
Close resources associated with the sock of this cnxn.
[ "Close", "resources", "associated", "with", "the", "sock", "of", "this", "cnxn", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/third_party/java/src/org/apache/zookeeper_voltpatches/server/NIOServerCnxn.java#L1440-L1491
62,247
VoltDB/voltdb
examples/contentionmark/ContentionMark.java
ContentionMark.increment
void increment() { long id = rand.nextInt(config.tuples); long toIncrement = rand.nextInt(5); // 0 - 4 try { client.callProcedure(new CMCallback(), "Increment", toIncrement, id); } catch (IOException e) { // This is not ideal error handling for production...
java
void increment() { long id = rand.nextInt(config.tuples); long toIncrement = rand.nextInt(5); // 0 - 4 try { client.callProcedure(new CMCallback(), "Increment", toIncrement, id); } catch (IOException e) { // This is not ideal error handling for production...
[ "void", "increment", "(", ")", "{", "long", "id", "=", "rand", ".", "nextInt", "(", "config", ".", "tuples", ")", ";", "long", "toIncrement", "=", "rand", ".", "nextInt", "(", "5", ")", ";", "// 0 - 4", "try", "{", "client", ".", "callProcedure", "("...
Run the "Increment" procedure on the server asynchronously.
[ "Run", "the", "Increment", "procedure", "on", "the", "server", "asynchronously", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/examples/contentionmark/ContentionMark.java#L249-L261
62,248
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/persist/Logger.java
Logger.writeToLog
public synchronized void writeToLog(Session session, String statement) { if (logStatements && log != null) { log.writeStatement(session, statement); } }
java
public synchronized void writeToLog(Session session, String statement) { if (logStatements && log != null) { log.writeStatement(session, statement); } }
[ "public", "synchronized", "void", "writeToLog", "(", "Session", "session", ",", "String", "statement", ")", "{", "if", "(", "logStatements", "&&", "log", "!=", "null", ")", "{", "log", ".", "writeStatement", "(", "session", ",", "statement", ")", ";", "}",...
Records a Log entry for the specified SQL statement, on behalf of the specified Session object. @param session the Session object for which to record the Log entry @param statement the SQL statement to Log @throws HsqlException if there is a problem recording the entry
[ "Records", "a", "Log", "entry", "for", "the", "specified", "SQL", "statement", "on", "behalf", "of", "the", "specified", "Session", "object", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/persist/Logger.java#L264-L269
62,249
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/persist/Logger.java
Logger.openTextCache
public DataFileCache openTextCache(Table table, String source, boolean readOnlyData, boolean reversed) { return log.openTextCache(table, source, readOnlyData, reversed); }
java
public DataFileCache openTextCache(Table table, String source, boolean readOnlyData, boolean reversed) { return log.openTextCache(table, source, readOnlyData, reversed); }
[ "public", "DataFileCache", "openTextCache", "(", "Table", "table", ",", "String", "source", ",", "boolean", "readOnlyData", ",", "boolean", "reversed", ")", "{", "return", "log", ".", "openTextCache", "(", "table", ",", "source", ",", "readOnlyData", ",", "rev...
Opens the TextCache object.
[ "Opens", "the", "TextCache", "object", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/persist/Logger.java#L420-L424
62,250
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/persist/DataFileCache.java
DataFileCache.initParams
protected void initParams(Database database, String baseFileName) { HsqlDatabaseProperties props = database.getProperties(); fileName = baseFileName + ".data"; backupFileName = baseFileName + ".backup"; this.database = database; fa = database.getFileAccess();...
java
protected void initParams(Database database, String baseFileName) { HsqlDatabaseProperties props = database.getProperties(); fileName = baseFileName + ".data"; backupFileName = baseFileName + ".backup"; this.database = database; fa = database.getFileAccess();...
[ "protected", "void", "initParams", "(", "Database", "database", ",", "String", "baseFileName", ")", "{", "HsqlDatabaseProperties", "props", "=", "database", ".", "getProperties", "(", ")", ";", "fileName", "=", "baseFileName", "+", "\".data\"", ";", "backupFileNam...
initial external parameters are set here.
[ "initial", "external", "parameters", "are", "set", "here", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/persist/DataFileCache.java#L143-L188
62,251
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/persist/DataFileCache.java
DataFileCache.close
public void close(boolean write) { SimpleLog appLog = database.logger.appLog; try { if (cacheReadonly) { if (dataFile != null) { dataFile.close(); dataFile = null; } return; } ...
java
public void close(boolean write) { SimpleLog appLog = database.logger.appLog; try { if (cacheReadonly) { if (dataFile != null) { dataFile.close(); dataFile = null; } return; } ...
[ "public", "void", "close", "(", "boolean", "write", ")", "{", "SimpleLog", "appLog", "=", "database", ".", "logger", ".", "appLog", ";", "try", "{", "if", "(", "cacheReadonly", ")", "{", "if", "(", "dataFile", "!=", "null", ")", "{", "dataFile", ".", ...
Parameter write indicates either an orderly close, or a fast close without backup. When false, just closes the file. When true, writes out all cached rows that have been modified and the free position pointer for the *.data file and then closes the file.
[ "Parameter", "write", "indicates", "either", "an", "orderly", "close", "or", "a", "fast", "close", "without", "backup", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/persist/DataFileCache.java#L319-L403
62,252
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/persist/DataFileCache.java
DataFileCache.defrag
public void defrag() { if (cacheReadonly) { return; } if (fileFreePosition == INITIAL_FREE_POS) { return; } database.logger.appLog.logContext(SimpleLog.LOG_NORMAL, "start"); try { boolean wasNio = dataFile.wasNio(); cac...
java
public void defrag() { if (cacheReadonly) { return; } if (fileFreePosition == INITIAL_FREE_POS) { return; } database.logger.appLog.logContext(SimpleLog.LOG_NORMAL, "start"); try { boolean wasNio = dataFile.wasNio(); cac...
[ "public", "void", "defrag", "(", ")", "{", "if", "(", "cacheReadonly", ")", "{", "return", ";", "}", "if", "(", "fileFreePosition", "==", "INITIAL_FREE_POS", ")", "{", "return", ";", "}", "database", ".", "logger", ".", "appLog", ".", "logContext", "(", ...
Writes out all the rows to a new file without fragmentation.
[ "Writes", "out", "all", "the", "rows", "to", "a", "new", "file", "without", "fragmentation", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/persist/DataFileCache.java#L421-L469
62,253
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/persist/DataFileCache.java
DataFileCache.remove
public void remove(int i, PersistentStore store) { writeLock.lock(); try { CachedObject r = release(i); if (r != null) { int size = r.getStorageSize(); freeBlocks.add(i, size); } } finally { writeLock.unlock(); ...
java
public void remove(int i, PersistentStore store) { writeLock.lock(); try { CachedObject r = release(i); if (r != null) { int size = r.getStorageSize(); freeBlocks.add(i, size); } } finally { writeLock.unlock(); ...
[ "public", "void", "remove", "(", "int", "i", ",", "PersistentStore", "store", ")", "{", "writeLock", ".", "lock", "(", ")", ";", "try", "{", "CachedObject", "r", "=", "release", "(", "i", ")", ";", "if", "(", "r", "!=", "null", ")", "{", "int", "...
Used when a row is deleted as a result of some DML or DDL statement. Removes the row from the cache data structures. Adds the file space for the row to the list of free positions.
[ "Used", "when", "a", "row", "is", "deleted", "as", "a", "result", "of", "some", "DML", "or", "DDL", "statement", ".", "Removes", "the", "row", "from", "the", "cache", "data", "structures", ".", "Adds", "the", "file", "space", "for", "the", "row", "to",...
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/persist/DataFileCache.java#L476-L491
62,254
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/persist/DataFileCache.java
DataFileCache.restore
public void restore(CachedObject object) { writeLock.lock(); try { int i = object.getPos(); cache.put(i, object); // was previously used for text tables if (storeOnInsert) { saveRow(object); } } finally { ...
java
public void restore(CachedObject object) { writeLock.lock(); try { int i = object.getPos(); cache.put(i, object); // was previously used for text tables if (storeOnInsert) { saveRow(object); } } finally { ...
[ "public", "void", "restore", "(", "CachedObject", "object", ")", "{", "writeLock", ".", "lock", "(", ")", ";", "try", "{", "int", "i", "=", "object", ".", "getPos", "(", ")", ";", "cache", ".", "put", "(", "i", ",", "object", ")", ";", "// was prev...
For a CacheObject that had been previously released from the cache. A new version is introduced, using the preallocated space for the object.
[ "For", "a", "CacheObject", "that", "had", "been", "previously", "released", "from", "the", "cache", ".", "A", "new", "version", "is", "introduced", "using", "the", "preallocated", "space", "for", "the", "object", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/persist/DataFileCache.java#L546-L562
62,255
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/persist/DataFileCache.java
DataFileCache.deleteOrResetFreePos
static void deleteOrResetFreePos(Database database, String filename) { ScaledRAFile raFile = null; database.getFileAccess().removeElement(filename); // OOo related code if (database.isStoredFileAccess()) { return; } // OOo end if (!database.getFile...
java
static void deleteOrResetFreePos(Database database, String filename) { ScaledRAFile raFile = null; database.getFileAccess().removeElement(filename); // OOo related code if (database.isStoredFileAccess()) { return; } // OOo end if (!database.getFile...
[ "static", "void", "deleteOrResetFreePos", "(", "Database", "database", ",", "String", "filename", ")", "{", "ScaledRAFile", "raFile", "=", "null", ";", "database", ".", "getFileAccess", "(", ")", ".", "removeElement", "(", "filename", ")", ";", "// OOo related c...
This method deletes a data file or resets its free position. this is used only for nio files - not OOo files
[ "This", "method", "deletes", "a", "data", "file", "or", "resets", "its", "free", "position", ".", "this", "is", "used", "only", "for", "nio", "files", "-", "not", "OOo", "files" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/persist/DataFileCache.java#L949-L981
62,256
VoltDB/voltdb
src/frontend/org/voltdb/sysprocs/SysProcFragmentId.java
SysProcFragmentId.isDurableFragment
public static boolean isDurableFragment(byte[] planHash) { long fragId = VoltSystemProcedure.hashToFragId(planHash); return (fragId == PF_prepBalancePartitions || fragId == PF_balancePartitions || fragId == PF_balancePartitionsData || fragId == PF_balance...
java
public static boolean isDurableFragment(byte[] planHash) { long fragId = VoltSystemProcedure.hashToFragId(planHash); return (fragId == PF_prepBalancePartitions || fragId == PF_balancePartitions || fragId == PF_balancePartitionsData || fragId == PF_balance...
[ "public", "static", "boolean", "isDurableFragment", "(", "byte", "[", "]", "planHash", ")", "{", "long", "fragId", "=", "VoltSystemProcedure", ".", "hashToFragId", "(", "planHash", ")", ";", "return", "(", "fragId", "==", "PF_prepBalancePartitions", "||", "fragI...
for sysprocs and we cant distinguish if this needs to be replayed or not.
[ "for", "sysprocs", "and", "we", "cant", "distinguish", "if", "this", "needs", "to", "be", "replayed", "or", "not", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/sysprocs/SysProcFragmentId.java#L82-L90
62,257
VoltDB/voltdb
src/frontend/org/voltdb/jdbc/JDBC4ExecutionFuture.java
JDBC4ExecutionFuture.set
protected void set(ClientResponse response) { if (!this.status.compareAndSet(STATUS_RUNNING, STATUS_SUCCESS)) return; this.response = response; this.latch.countDown(); }
java
protected void set(ClientResponse response) { if (!this.status.compareAndSet(STATUS_RUNNING, STATUS_SUCCESS)) return; this.response = response; this.latch.countDown(); }
[ "protected", "void", "set", "(", "ClientResponse", "response", ")", "{", "if", "(", "!", "this", ".", "status", ".", "compareAndSet", "(", "STATUS_RUNNING", ",", "STATUS_SUCCESS", ")", ")", "return", ";", "this", ".", "response", "=", "response", ";", "thi...
Sets the result of the operation and flag the execution call as completed. @param response the execution call's response sent back by the database.
[ "Sets", "the", "result", "of", "the", "operation", "and", "flag", "the", "execution", "call", "as", "completed", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/jdbc/JDBC4ExecutionFuture.java#L62-L67
62,258
VoltDB/voltdb
src/frontend/org/voltdb/planner/SelectSubPlanAssembler.java
SelectSubPlanAssembler.generateInnerJoinOrdersForTree
private static List<JoinNode> generateInnerJoinOrdersForTree(JoinNode subTree) { // Get a list of the leaf nodes(tables) to permute them List<JoinNode> tableNodes = subTree.generateLeafNodesJoinOrder(); List<List<JoinNode>> joinOrders = PermutationGenerator.generatePurmutations(tableNodes); ...
java
private static List<JoinNode> generateInnerJoinOrdersForTree(JoinNode subTree) { // Get a list of the leaf nodes(tables) to permute them List<JoinNode> tableNodes = subTree.generateLeafNodesJoinOrder(); List<List<JoinNode>> joinOrders = PermutationGenerator.generatePurmutations(tableNodes); ...
[ "private", "static", "List", "<", "JoinNode", ">", "generateInnerJoinOrdersForTree", "(", "JoinNode", "subTree", ")", "{", "// Get a list of the leaf nodes(tables) to permute them", "List", "<", "JoinNode", ">", "tableNodes", "=", "subTree", ".", "generateLeafNodesJoinOrder...
Helper method to generate join orders for a join tree containing only INNER joins that can be obtained by the permutation of the original tables. @param subTree join tree @return list of valid join orders
[ "Helper", "method", "to", "generate", "join", "orders", "for", "a", "join", "tree", "containing", "only", "INNER", "joins", "that", "can", "be", "obtained", "by", "the", "permutation", "of", "the", "original", "tables", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/planner/SelectSubPlanAssembler.java#L186-L207
62,259
VoltDB/voltdb
src/frontend/org/voltdb/planner/SelectSubPlanAssembler.java
SelectSubPlanAssembler.generateOuterJoinOrdersForTree
private static List<JoinNode> generateOuterJoinOrdersForTree(JoinNode subTree) { List<JoinNode> treePermutations = new ArrayList<>(); treePermutations.add(subTree); return treePermutations; }
java
private static List<JoinNode> generateOuterJoinOrdersForTree(JoinNode subTree) { List<JoinNode> treePermutations = new ArrayList<>(); treePermutations.add(subTree); return treePermutations; }
[ "private", "static", "List", "<", "JoinNode", ">", "generateOuterJoinOrdersForTree", "(", "JoinNode", "subTree", ")", "{", "List", "<", "JoinNode", ">", "treePermutations", "=", "new", "ArrayList", "<>", "(", ")", ";", "treePermutations", ".", "add", "(", "sub...
Helper method to generate join orders for an OUTER join tree. At the moment, permutations for LEFT Joins are not supported yet @param subTree join tree @return list of valid join orders
[ "Helper", "method", "to", "generate", "join", "orders", "for", "an", "OUTER", "join", "tree", ".", "At", "the", "moment", "permutations", "for", "LEFT", "Joins", "are", "not", "supported", "yet" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/planner/SelectSubPlanAssembler.java#L216-L220
62,260
VoltDB/voltdb
src/frontend/org/voltdb/planner/SelectSubPlanAssembler.java
SelectSubPlanAssembler.generateFullJoinOrdersForTree
private static List<JoinNode> generateFullJoinOrdersForTree(JoinNode subTree) { assert(subTree != null); List<JoinNode> joinOrders = new ArrayList<>(); if (!(subTree instanceof BranchNode)) { // End of recursion joinOrders.add(subTree); return joinOrders; ...
java
private static List<JoinNode> generateFullJoinOrdersForTree(JoinNode subTree) { assert(subTree != null); List<JoinNode> joinOrders = new ArrayList<>(); if (!(subTree instanceof BranchNode)) { // End of recursion joinOrders.add(subTree); return joinOrders; ...
[ "private", "static", "List", "<", "JoinNode", ">", "generateFullJoinOrdersForTree", "(", "JoinNode", "subTree", ")", "{", "assert", "(", "subTree", "!=", "null", ")", ";", "List", "<", "JoinNode", ">", "joinOrders", "=", "new", "ArrayList", "<>", "(", ")", ...
Helper method to generate join orders for a join tree containing only FULL joins. The only allowed permutation is a join order that has original left and right nodes swapped. @param subTree join tree @return list of valid join orders
[ "Helper", "method", "to", "generate", "join", "orders", "for", "a", "join", "tree", "containing", "only", "FULL", "joins", ".", "The", "only", "allowed", "permutation", "is", "a", "join", "order", "that", "has", "original", "left", "and", "right", "nodes", ...
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/planner/SelectSubPlanAssembler.java#L230-L267
62,261
VoltDB/voltdb
src/frontend/org/voltdb/planner/SelectSubPlanAssembler.java
SelectSubPlanAssembler.generateMorePlansForJoinTree
private void generateMorePlansForJoinTree(JoinNode joinTree) { assert(joinTree != null); // generate the access paths for all nodes generateAccessPaths(joinTree); List<JoinNode> nodes = joinTree.generateAllNodesJoinOrder(); generateSubPlanForJoinNodeRecursively(joinTree, 0, node...
java
private void generateMorePlansForJoinTree(JoinNode joinTree) { assert(joinTree != null); // generate the access paths for all nodes generateAccessPaths(joinTree); List<JoinNode> nodes = joinTree.generateAllNodesJoinOrder(); generateSubPlanForJoinNodeRecursively(joinTree, 0, node...
[ "private", "void", "generateMorePlansForJoinTree", "(", "JoinNode", "joinTree", ")", "{", "assert", "(", "joinTree", "!=", "null", ")", ";", "// generate the access paths for all nodes", "generateAccessPaths", "(", "joinTree", ")", ";", "List", "<", "JoinNode", ">", ...
Given a specific join order, compute all possible sub-plan-graphs for that join order and add them to the deque of plans. If this doesn't add plans, it doesn't mean no more plans can be generated. It's possible that the particular join order it got had no reasonable plans. @param joinTree An array of tables in the joi...
[ "Given", "a", "specific", "join", "order", "compute", "all", "possible", "sub", "-", "plan", "-", "graphs", "for", "that", "join", "order", "and", "add", "them", "to", "the", "deque", "of", "plans", ".", "If", "this", "doesn", "t", "add", "plans", "it"...
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/planner/SelectSubPlanAssembler.java#L339-L346
62,262
VoltDB/voltdb
src/frontend/org/voltdb/planner/SelectSubPlanAssembler.java
SelectSubPlanAssembler.generateInnerAccessPaths
private void generateInnerAccessPaths(BranchNode parentNode) { JoinNode innerChildNode = parentNode.getRightNode(); assert(innerChildNode != null); // In case of inner join WHERE and JOIN expressions can be merged if (parentNode.getJoinType() == JoinType.INNER) { parentNode.m...
java
private void generateInnerAccessPaths(BranchNode parentNode) { JoinNode innerChildNode = parentNode.getRightNode(); assert(innerChildNode != null); // In case of inner join WHERE and JOIN expressions can be merged if (parentNode.getJoinType() == JoinType.INNER) { parentNode.m...
[ "private", "void", "generateInnerAccessPaths", "(", "BranchNode", "parentNode", ")", "{", "JoinNode", "innerChildNode", "=", "parentNode", ".", "getRightNode", "(", ")", ";", "assert", "(", "innerChildNode", "!=", "null", ")", ";", "// In case of inner join WHERE and ...
Generate all possible access paths for an inner node in a join. The set of potential index expressions depends whether the inner node can be inlined with the NLIJ or not. In the former case, inner and inner-outer join expressions can be considered for the index access. In the latter, only inner join expressions qualifi...
[ "Generate", "all", "possible", "access", "paths", "for", "an", "inner", "node", "in", "a", "join", ".", "The", "set", "of", "potential", "index", "expressions", "depends", "whether", "the", "inner", "node", "can", "be", "inlined", "with", "the", "NLIJ", "o...
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/planner/SelectSubPlanAssembler.java#L423-L527
62,263
VoltDB/voltdb
src/frontend/org/voltdb/planner/SelectSubPlanAssembler.java
SelectSubPlanAssembler.getSelectSubPlanForJoinNode
private AbstractPlanNode getSelectSubPlanForJoinNode(JoinNode joinNode) { assert(joinNode != null); if (joinNode instanceof BranchNode) { BranchNode branchJoinNode = (BranchNode)joinNode; // Outer node AbstractPlanNode outerScanPlan = getSelectSubP...
java
private AbstractPlanNode getSelectSubPlanForJoinNode(JoinNode joinNode) { assert(joinNode != null); if (joinNode instanceof BranchNode) { BranchNode branchJoinNode = (BranchNode)joinNode; // Outer node AbstractPlanNode outerScanPlan = getSelectSubP...
[ "private", "AbstractPlanNode", "getSelectSubPlanForJoinNode", "(", "JoinNode", "joinNode", ")", "{", "assert", "(", "joinNode", "!=", "null", ")", ";", "if", "(", "joinNode", "instanceof", "BranchNode", ")", "{", "BranchNode", "branchJoinNode", "=", "(", "BranchNo...
Given a specific join node and access path set for inner and outer tables, construct the plan that gives the right tuples. @param joinNode The join node to build the plan for. @return A completed plan-sub-graph that should match the correct tuples from the correct tables.
[ "Given", "a", "specific", "join", "node", "and", "access", "path", "set", "for", "inner", "and", "outer", "tables", "construct", "the", "plan", "that", "gives", "the", "right", "tuples", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/planner/SelectSubPlanAssembler.java#L571-L624
62,264
VoltDB/voltdb
src/frontend/org/voltdb/planner/SelectSubPlanAssembler.java
SelectSubPlanAssembler.filterSingleTVEExpressions
private static List<AbstractExpression> filterSingleTVEExpressions(List<AbstractExpression> exprs, List<AbstractExpression> otherExprs) { List<AbstractExpression> singleTVEExprs = new ArrayList<>(); for (AbstractExpression expr : exprs) { List<TupleValueExpression> tves = Express...
java
private static List<AbstractExpression> filterSingleTVEExpressions(List<AbstractExpression> exprs, List<AbstractExpression> otherExprs) { List<AbstractExpression> singleTVEExprs = new ArrayList<>(); for (AbstractExpression expr : exprs) { List<TupleValueExpression> tves = Express...
[ "private", "static", "List", "<", "AbstractExpression", ">", "filterSingleTVEExpressions", "(", "List", "<", "AbstractExpression", ">", "exprs", ",", "List", "<", "AbstractExpression", ">", "otherExprs", ")", "{", "List", "<", "AbstractExpression", ">", "singleTVEEx...
A method to filter out single-TVE expressions. @param expr List of single-TVE expressions. @param otherExprs List of multi-TVE expressions. @return List of single-TVE expressions from the input collection.
[ "A", "method", "to", "filter", "out", "single", "-", "TVE", "expressions", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/planner/SelectSubPlanAssembler.java#L835-L847
62,265
VoltDB/voltdb
src/frontend/org/voltdb/importclient/kafka10/KafkaLoader.java
KafkaLoader.notifyShutdown
public void notifyShutdown() { if (m_shutdown.compareAndSet(false, true)) { for (KafkaExternalConsumerRunner consumer : m_consumers) { consumer.shutdown(); } close(); } }
java
public void notifyShutdown() { if (m_shutdown.compareAndSet(false, true)) { for (KafkaExternalConsumerRunner consumer : m_consumers) { consumer.shutdown(); } close(); } }
[ "public", "void", "notifyShutdown", "(", ")", "{", "if", "(", "m_shutdown", ".", "compareAndSet", "(", "false", ",", "true", ")", ")", "{", "for", "(", "KafkaExternalConsumerRunner", "consumer", ":", "m_consumers", ")", "{", "consumer", ".", "shutdown", "(",...
shutdown hook to notify kafka consumer threads of shutdown
[ "shutdown", "hook", "to", "notify", "kafka", "consumer", "threads", "of", "shutdown" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/importclient/kafka10/KafkaLoader.java#L217-L224
62,266
VoltDB/voltdb
src/frontend/org/voltdb/PostgreSQLBackend.java
PostgreSQLBackend.runDDL
protected void runDDL(String ddl, boolean transformDdl) { String modifiedDdl = (transformDdl ? transformDDL(ddl) : ddl); printTransformedSql(ddl, modifiedDdl); super.runDDL(modifiedDdl); }
java
protected void runDDL(String ddl, boolean transformDdl) { String modifiedDdl = (transformDdl ? transformDDL(ddl) : ddl); printTransformedSql(ddl, modifiedDdl); super.runDDL(modifiedDdl); }
[ "protected", "void", "runDDL", "(", "String", "ddl", ",", "boolean", "transformDdl", ")", "{", "String", "modifiedDdl", "=", "(", "transformDdl", "?", "transformDDL", "(", "ddl", ")", ":", "ddl", ")", ";", "printTransformedSql", "(", "ddl", ",", "modifiedDdl...
Optionally, modifies DDL statements in such a way that PostgreSQL results will match VoltDB results; and then passes the remaining work to the base class version.
[ "Optionally", "modifies", "DDL", "statements", "in", "such", "a", "way", "that", "PostgreSQL", "results", "will", "match", "VoltDB", "results", ";", "and", "then", "passes", "the", "remaining", "work", "to", "the", "base", "class", "version", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/PostgreSQLBackend.java#L601-L605
62,267
VoltDB/voltdb
src/frontend/org/voltdb/PostgreSQLBackend.java
PostgreSQLBackend.getVoltColumnTypeName
@Override protected String getVoltColumnTypeName(String columnTypeName) { String equivalentTypeName = m_PostgreSQLTypeNames.get(columnTypeName); return (equivalentTypeName == null) ? columnTypeName.toUpperCase() : equivalentTypeName; }
java
@Override protected String getVoltColumnTypeName(String columnTypeName) { String equivalentTypeName = m_PostgreSQLTypeNames.get(columnTypeName); return (equivalentTypeName == null) ? columnTypeName.toUpperCase() : equivalentTypeName; }
[ "@", "Override", "protected", "String", "getVoltColumnTypeName", "(", "String", "columnTypeName", ")", "{", "String", "equivalentTypeName", "=", "m_PostgreSQLTypeNames", ".", "get", "(", "columnTypeName", ")", ";", "return", "(", "equivalentTypeName", "==", "null", ...
Returns the column type name, in VoltDB, corresponding to the specified column type name in PostgreSQL.
[ "Returns", "the", "column", "type", "name", "in", "VoltDB", "corresponding", "to", "the", "specified", "column", "type", "name", "in", "PostgreSQL", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/PostgreSQLBackend.java#L617-L621
62,268
VoltDB/voltdb
src/frontend/org/voltdb/PostgreSQLBackend.java
PostgreSQLBackend.numOccurencesOfCharIn
static private int numOccurencesOfCharIn(String str, char ch) { boolean inMiddleOfQuote = false; int num = 0, previousIndex = 0; for (int index = str.indexOf(ch); index >= 0 ; index = str.indexOf(ch, index+1)) { if (hasOddNumberOfSingleQuotes(str.substring(previousIndex, index))) { ...
java
static private int numOccurencesOfCharIn(String str, char ch) { boolean inMiddleOfQuote = false; int num = 0, previousIndex = 0; for (int index = str.indexOf(ch); index >= 0 ; index = str.indexOf(ch, index+1)) { if (hasOddNumberOfSingleQuotes(str.substring(previousIndex, index))) { ...
[ "static", "private", "int", "numOccurencesOfCharIn", "(", "String", "str", ",", "char", "ch", ")", "{", "boolean", "inMiddleOfQuote", "=", "false", ";", "int", "num", "=", "0", ",", "previousIndex", "=", "0", ";", "for", "(", "int", "index", "=", "str", ...
Returns the number of occurrences of the specified character in the specified String, but ignoring those contained in single quotes.
[ "Returns", "the", "number", "of", "occurrences", "of", "the", "specified", "character", "in", "the", "specified", "String", "but", "ignoring", "those", "contained", "in", "single", "quotes", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/PostgreSQLBackend.java#L649-L662
62,269
VoltDB/voltdb
src/frontend/org/voltdb/PostgreSQLBackend.java
PostgreSQLBackend.indexOfNthOccurrenceOfCharIn
static private int indexOfNthOccurrenceOfCharIn(String str, char ch, int n) { boolean inMiddleOfQuote = false; int index = -1, previousIndex = 0; for (int i=0; i < n; i++) { do { index = str.indexOf(ch, index+1); if (index < 0) { re...
java
static private int indexOfNthOccurrenceOfCharIn(String str, char ch, int n) { boolean inMiddleOfQuote = false; int index = -1, previousIndex = 0; for (int i=0; i < n; i++) { do { index = str.indexOf(ch, index+1); if (index < 0) { re...
[ "static", "private", "int", "indexOfNthOccurrenceOfCharIn", "(", "String", "str", ",", "char", "ch", ",", "int", "n", ")", "{", "boolean", "inMiddleOfQuote", "=", "false", ";", "int", "index", "=", "-", "1", ",", "previousIndex", "=", "0", ";", "for", "(...
Returns the Nth occurrence of the specified character in the specified String, but ignoring those contained in single quotes.
[ "Returns", "the", "Nth", "occurrence", "of", "the", "specified", "character", "in", "the", "specified", "String", "but", "ignoring", "those", "contained", "in", "single", "quotes", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/PostgreSQLBackend.java#L666-L682
62,270
VoltDB/voltdb
src/frontend/org/voltdb/PostgreSQLBackend.java
PostgreSQLBackend.runDML
protected VoltTable runDML(String dml, boolean transformDml) { String modifiedDml = (transformDml ? transformDML(dml) : dml); printTransformedSql(dml, modifiedDml); return super.runDML(modifiedDml); }
java
protected VoltTable runDML(String dml, boolean transformDml) { String modifiedDml = (transformDml ? transformDML(dml) : dml); printTransformedSql(dml, modifiedDml); return super.runDML(modifiedDml); }
[ "protected", "VoltTable", "runDML", "(", "String", "dml", ",", "boolean", "transformDml", ")", "{", "String", "modifiedDml", "=", "(", "transformDml", "?", "transformDML", "(", "dml", ")", ":", "dml", ")", ";", "printTransformedSql", "(", "dml", ",", "modifi...
Optionally, modifies queries in such a way that PostgreSQL results will match VoltDB results; and then passes the remaining work to the base class version.
[ "Optionally", "modifies", "queries", "in", "such", "a", "way", "that", "PostgreSQL", "results", "will", "match", "VoltDB", "results", ";", "and", "then", "passes", "the", "remaining", "work", "to", "the", "base", "class", "version", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/PostgreSQLBackend.java#L1066-L1070
62,271
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/lib/ArrayUtil.java
ArrayUtil.getClassCode
static int getClassCode(Class cla) { if (!cla.isPrimitive()) { return ArrayUtil.CLASS_CODE_OBJECT; } return classCodeMap.get(cla, -1); }
java
static int getClassCode(Class cla) { if (!cla.isPrimitive()) { return ArrayUtil.CLASS_CODE_OBJECT; } return classCodeMap.get(cla, -1); }
[ "static", "int", "getClassCode", "(", "Class", "cla", ")", "{", "if", "(", "!", "cla", ".", "isPrimitive", "(", ")", ")", "{", "return", "ArrayUtil", ".", "CLASS_CODE_OBJECT", ";", "}", "return", "classCodeMap", ".", "get", "(", "cla", ",", "-", "1", ...
Returns a distinct int code for each primitive type and for all Object types.
[ "Returns", "a", "distinct", "int", "code", "for", "each", "primitive", "type", "and", "for", "all", "Object", "types", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/lib/ArrayUtil.java#L71-L78
62,272
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/lib/ArrayUtil.java
ArrayUtil.clearArray
public static void clearArray(int type, Object data, int from, int to) { switch (type) { case ArrayUtil.CLASS_CODE_BYTE : { byte[] array = (byte[]) data; while (--to >= from) { array[to] = 0; } return; ...
java
public static void clearArray(int type, Object data, int from, int to) { switch (type) { case ArrayUtil.CLASS_CODE_BYTE : { byte[] array = (byte[]) data; while (--to >= from) { array[to] = 0; } return; ...
[ "public", "static", "void", "clearArray", "(", "int", "type", ",", "Object", "data", ",", "int", "from", ",", "int", "to", ")", "{", "switch", "(", "type", ")", "{", "case", "ArrayUtil", ".", "CLASS_CODE_BYTE", ":", "{", "byte", "[", "]", "array", "=...
Clears an area of the given array of the given type.
[ "Clears", "an", "area", "of", "the", "given", "array", "of", "the", "given", "type", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/lib/ArrayUtil.java#L83-L169
62,273
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/lib/ArrayUtil.java
ArrayUtil.adjustArray
public static void adjustArray(int type, Object array, int usedElements, int index, int count) { if (index >= usedElements) { return; } int newCount = usedElements + count; int source; int target; int size; if (cou...
java
public static void adjustArray(int type, Object array, int usedElements, int index, int count) { if (index >= usedElements) { return; } int newCount = usedElements + count; int source; int target; int size; if (cou...
[ "public", "static", "void", "adjustArray", "(", "int", "type", ",", "Object", "array", ",", "int", "usedElements", ",", "int", "index", ",", "int", "count", ")", "{", "if", "(", "index", ">=", "usedElements", ")", "{", "return", ";", "}", "int", "newCo...
Moves the contents of an array to allow both addition and removal of elements. Used arguments must be in range. @param type class type of the array @param array the array @param usedElements count of elements of array in use @param index point at which to add or remove elements @param count number of elements to add o...
[ "Moves", "the", "contents", "of", "an", "array", "to", "allow", "both", "addition", "and", "removal", "of", "elements", ".", "Used", "arguments", "must", "be", "in", "range", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/lib/ArrayUtil.java#L181-L210
62,274
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/lib/ArrayUtil.java
ArrayUtil.sortArray
public static void sortArray(int[] array) { boolean swapped; do { swapped = false; for (int i = 0; i < array.length - 1; i++) { if (array[i] > array[i + 1]) { int temp = array[i + 1]; array[i + 1] = array[i]; ...
java
public static void sortArray(int[] array) { boolean swapped; do { swapped = false; for (int i = 0; i < array.length - 1; i++) { if (array[i] > array[i + 1]) { int temp = array[i + 1]; array[i + 1] = array[i]; ...
[ "public", "static", "void", "sortArray", "(", "int", "[", "]", "array", ")", "{", "boolean", "swapped", ";", "do", "{", "swapped", "=", "false", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "array", ".", "length", "-", "1", ";", "i", "...
Basic sort for small arrays of int.
[ "Basic", "sort", "for", "small", "arrays", "of", "int", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/lib/ArrayUtil.java#L215-L232
62,275
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/lib/ArrayUtil.java
ArrayUtil.find
public static int find(Object[] array, Object object) { for (int i = 0; i < array.length; i++) { if (array[i] == object) { // hadles both nulls return i; } if (object != null && object.equals(array[i])) { return i; ...
java
public static int find(Object[] array, Object object) { for (int i = 0; i < array.length; i++) { if (array[i] == object) { // hadles both nulls return i; } if (object != null && object.equals(array[i])) { return i; ...
[ "public", "static", "int", "find", "(", "Object", "[", "]", "array", ",", "Object", "object", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "array", ".", "length", ";", "i", "++", ")", "{", "if", "(", "array", "[", "i", "]", "=="...
Basic find for small arrays of Object.
[ "Basic", "find", "for", "small", "arrays", "of", "Object", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/lib/ArrayUtil.java#L237-L252
62,276
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/lib/ArrayUtil.java
ArrayUtil.findNot
public static int findNot(int[] array, int value) { for (int i = 0; i < array.length; i++) { if (array[i] != value) { return i; } } return -1; }
java
public static int findNot(int[] array, int value) { for (int i = 0; i < array.length; i++) { if (array[i] != value) { return i; } } return -1; }
[ "public", "static", "int", "findNot", "(", "int", "[", "]", "array", ",", "int", "value", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "array", ".", "length", ";", "i", "++", ")", "{", "if", "(", "array", "[", "i", "]", "!=", ...
Finds the first element of the array that is not equal to the given value.
[ "Finds", "the", "first", "element", "of", "the", "array", "that", "is", "not", "equal", "to", "the", "given", "value", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/lib/ArrayUtil.java#L293-L302
62,277
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/lib/ArrayUtil.java
ArrayUtil.areEqualSets
public static boolean areEqualSets(int[] arra, int[] arrb) { return arra.length == arrb.length && ArrayUtil.haveEqualSets(arra, arrb, arra.length); }
java
public static boolean areEqualSets(int[] arra, int[] arrb) { return arra.length == arrb.length && ArrayUtil.haveEqualSets(arra, arrb, arra.length); }
[ "public", "static", "boolean", "areEqualSets", "(", "int", "[", "]", "arra", ",", "int", "[", "]", "arrb", ")", "{", "return", "arra", ".", "length", "==", "arrb", ".", "length", "&&", "ArrayUtil", ".", "haveEqualSets", "(", "arra", ",", "arrb", ",", ...
Returns true if arra and arrb contain the same set of integers, not necessarily in the same order. This implies the arrays are of the same length.
[ "Returns", "true", "if", "arra", "and", "arrb", "contain", "the", "same", "set", "of", "integers", "not", "necessarily", "in", "the", "same", "order", ".", "This", "implies", "the", "arrays", "are", "of", "the", "same", "length", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/lib/ArrayUtil.java#L309-L312
62,278
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/lib/ArrayUtil.java
ArrayUtil.haveEqualArrays
public static boolean haveEqualArrays(int[] arra, int[] arrb, int count) { if (count > arra.length || count > arrb.length) { return false; } for (int j = 0; j < count; j++) { if (arra[j] != arrb[j]) { return false; } } return...
java
public static boolean haveEqualArrays(int[] arra, int[] arrb, int count) { if (count > arra.length || count > arrb.length) { return false; } for (int j = 0; j < count; j++) { if (arra[j] != arrb[j]) { return false; } } return...
[ "public", "static", "boolean", "haveEqualArrays", "(", "int", "[", "]", "arra", ",", "int", "[", "]", "arrb", ",", "int", "count", ")", "{", "if", "(", "count", ">", "arra", ".", "length", "||", "count", ">", "arrb", ".", "length", ")", "{", "retur...
Returns true if the first count elements of arra and arrb are identical subarrays of integers
[ "Returns", "true", "if", "the", "first", "count", "elements", "of", "arra", "and", "arrb", "are", "identical", "subarrays", "of", "integers" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/lib/ArrayUtil.java#L377-L390
62,279
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/lib/ArrayUtil.java
ArrayUtil.haveEqualArrays
public static boolean haveEqualArrays(Object[] arra, Object[] arrb, int count) { if (count > arra.length || count > arrb.length) { return false; } for (int j = 0; j < count; j++) { if (arra[j] != arrb[j]) { if (a...
java
public static boolean haveEqualArrays(Object[] arra, Object[] arrb, int count) { if (count > arra.length || count > arrb.length) { return false; } for (int j = 0; j < count; j++) { if (arra[j] != arrb[j]) { if (a...
[ "public", "static", "boolean", "haveEqualArrays", "(", "Object", "[", "]", "arra", ",", "Object", "[", "]", "arrb", ",", "int", "count", ")", "{", "if", "(", "count", ">", "arra", ".", "length", "||", "count", ">", "arrb", ".", "length", ")", "{", ...
Returns true if the first count elements of arra and arrb are identical subarrays of Objects
[ "Returns", "true", "if", "the", "first", "count", "elements", "of", "arra", "and", "arrb", "are", "identical", "subarrays", "of", "Objects" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/lib/ArrayUtil.java#L397-L413
62,280
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/lib/ArrayUtil.java
ArrayUtil.countSameElements
public static int countSameElements(byte[] arra, int start, byte[] arrb) { int k = 0; int limit = arra.length - start; if (limit > arrb.length) { limit = arrb.length; } for (int i = 0; i < limit; i++) { if (arra[i + start] == arrb[i]) { ...
java
public static int countSameElements(byte[] arra, int start, byte[] arrb) { int k = 0; int limit = arra.length - start; if (limit > arrb.length) { limit = arrb.length; } for (int i = 0; i < limit; i++) { if (arra[i + start] == arrb[i]) { ...
[ "public", "static", "int", "countSameElements", "(", "byte", "[", "]", "arra", ",", "int", "start", ",", "byte", "[", "]", "arrb", ")", "{", "int", "k", "=", "0", ";", "int", "limit", "=", "arra", ".", "length", "-", "start", ";", "if", "(", "lim...
Returns the count of elements in arra from position start that are sequentially equal to the elements of arrb.
[ "Returns", "the", "count", "of", "elements", "in", "arra", "from", "position", "start", "that", "are", "sequentially", "equal", "to", "the", "elements", "of", "arrb", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/lib/ArrayUtil.java#L518-L536
62,281
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/lib/ArrayUtil.java
ArrayUtil.find
public static int find(byte[] arra, int start, int limit, byte[] arrb) { int k = start; limit = limit - arrb.length + 1; int value = arrb[0]; for (; k < limit; k++) { if (arra[k] == value) { if (arrb.length == 1) { return k; ...
java
public static int find(byte[] arra, int start, int limit, byte[] arrb) { int k = start; limit = limit - arrb.length + 1; int value = arrb[0]; for (; k < limit; k++) { if (arra[k] == value) { if (arrb.length == 1) { return k; ...
[ "public", "static", "int", "find", "(", "byte", "[", "]", "arra", ",", "int", "start", ",", "int", "limit", ",", "byte", "[", "]", "arrb", ")", "{", "int", "k", "=", "start", ";", "limit", "=", "limit", "-", "arrb", ".", "length", "+", "1", ";"...
Returns the index of the first occurence of arrb in arra. Or -1 if not found.
[ "Returns", "the", "index", "of", "the", "first", "occurence", "of", "arrb", "in", "arra", ".", "Or", "-", "1", "if", "not", "found", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/lib/ArrayUtil.java#L565-L586
62,282
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/lib/ArrayUtil.java
ArrayUtil.find
public static int find(byte[] arra, int start, int limit, int b, int c) { int k = 0; for (; k < limit; k++) { if (arra[k] == b || arra[k] == c) { return k; } } return -1; }
java
public static int find(byte[] arra, int start, int limit, int b, int c) { int k = 0; for (; k < limit; k++) { if (arra[k] == b || arra[k] == c) { return k; } } return -1; }
[ "public", "static", "int", "find", "(", "byte", "[", "]", "arra", ",", "int", "start", ",", "int", "limit", ",", "int", "b", ",", "int", "c", ")", "{", "int", "k", "=", "0", ";", "for", "(", ";", "k", "<", "limit", ";", "k", "++", ")", "{",...
Returns the index of b or c in arra. Or -1 if not found.
[ "Returns", "the", "index", "of", "b", "or", "c", "in", "arra", ".", "Or", "-", "1", "if", "not", "found", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/lib/ArrayUtil.java#L633-L644
62,283
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/lib/ArrayUtil.java
ArrayUtil.intIndexesToBooleanArray
public static void intIndexesToBooleanArray(int[] arra, boolean[] arrb) { for (int i = 0; i < arra.length; i++) { if (arra[i] < arrb.length) { arrb[arra[i]] = true; } } }
java
public static void intIndexesToBooleanArray(int[] arra, boolean[] arrb) { for (int i = 0; i < arra.length; i++) { if (arra[i] < arrb.length) { arrb[arra[i]] = true; } } }
[ "public", "static", "void", "intIndexesToBooleanArray", "(", "int", "[", "]", "arra", ",", "boolean", "[", "]", "arrb", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "arra", ".", "length", ";", "i", "++", ")", "{", "if", "(", "arra",...
Set elements of arrb true if their indexes appear in arrb.
[ "Set", "elements", "of", "arrb", "true", "if", "their", "indexes", "appear", "in", "arrb", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/lib/ArrayUtil.java#L649-L656
62,284
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/lib/ArrayUtil.java
ArrayUtil.containsAllTrueElements
public static boolean containsAllTrueElements(boolean[] arra, boolean[] arrb) { for (int i = 0; i < arra.length; i++) { if (arrb[i] && !arra[i]) { return false; } } return true; }
java
public static boolean containsAllTrueElements(boolean[] arra, boolean[] arrb) { for (int i = 0; i < arra.length; i++) { if (arrb[i] && !arra[i]) { return false; } } return true; }
[ "public", "static", "boolean", "containsAllTrueElements", "(", "boolean", "[", "]", "arra", ",", "boolean", "[", "]", "arrb", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "arra", ".", "length", ";", "i", "++", ")", "{", "if", "(", "...
Return true if for each true element in arrb, the corresponding element in arra is true
[ "Return", "true", "if", "for", "each", "true", "element", "in", "arrb", "the", "corresponding", "element", "in", "arra", "is", "true" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/lib/ArrayUtil.java#L683-L693
62,285
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/lib/ArrayUtil.java
ArrayUtil.countTrueElements
public static int countTrueElements(boolean[] arra) { int count = 0; for (int i = 0; i < arra.length; i++) { if (arra[i]) { count++; } } return count; }
java
public static int countTrueElements(boolean[] arra) { int count = 0; for (int i = 0; i < arra.length; i++) { if (arra[i]) { count++; } } return count; }
[ "public", "static", "int", "countTrueElements", "(", "boolean", "[", "]", "arra", ")", "{", "int", "count", "=", "0", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "arra", ".", "length", ";", "i", "++", ")", "{", "if", "(", "arra", "[",...
Return count of true elements in array
[ "Return", "count", "of", "true", "elements", "in", "array" ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/lib/ArrayUtil.java#L698-L709
62,286
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/lib/ArrayUtil.java
ArrayUtil.hasNull
public static boolean hasNull(Object[] array, int[] columnMap) { int count = columnMap.length; for (int i = 0; i < count; i++) { if (array[columnMap[i]] == null) { return true; } } return false; }
java
public static boolean hasNull(Object[] array, int[] columnMap) { int count = columnMap.length; for (int i = 0; i < count; i++) { if (array[columnMap[i]] == null) { return true; } } return false; }
[ "public", "static", "boolean", "hasNull", "(", "Object", "[", "]", "array", ",", "int", "[", "]", "columnMap", ")", "{", "int", "count", "=", "columnMap", ".", "length", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "count", ";", "i", "++...
Determines if the array has a null column for any of the positions given in the rowColMap array.
[ "Determines", "if", "the", "array", "has", "a", "null", "column", "for", "any", "of", "the", "positions", "given", "in", "the", "rowColMap", "array", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/lib/ArrayUtil.java#L715-L726
62,287
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/lib/ArrayUtil.java
ArrayUtil.containsAt
public static boolean containsAt(byte[] arra, int start, byte[] arrb) { return countSameElements(arra, start, arrb) == arrb.length; }
java
public static boolean containsAt(byte[] arra, int start, byte[] arrb) { return countSameElements(arra, start, arrb) == arrb.length; }
[ "public", "static", "boolean", "containsAt", "(", "byte", "[", "]", "arra", ",", "int", "start", ",", "byte", "[", "]", "arrb", ")", "{", "return", "countSameElements", "(", "arra", ",", "start", ",", "arrb", ")", "==", "arrb", ".", "length", ";", "}...
Returns true if arra from position start contains all elements of arrb in sequential order.
[ "Returns", "true", "if", "arra", "from", "position", "start", "contains", "all", "elements", "of", "arrb", "in", "sequential", "order", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/lib/ArrayUtil.java#L746-L748
62,288
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/lib/ArrayUtil.java
ArrayUtil.countStartElementsAt
public static int countStartElementsAt(byte[] arra, int start, byte[] arrb) { int k = 0; mainloop: for (int i = start; i < arra.length; i++) { for (int j = 0; j < arrb.length; j++) { if (arra[i] == arrb[j]) { ...
java
public static int countStartElementsAt(byte[] arra, int start, byte[] arrb) { int k = 0; mainloop: for (int i = start; i < arra.length; i++) { for (int j = 0; j < arrb.length; j++) { if (arra[i] == arrb[j]) { ...
[ "public", "static", "int", "countStartElementsAt", "(", "byte", "[", "]", "arra", ",", "int", "start", ",", "byte", "[", "]", "arrb", ")", "{", "int", "k", "=", "0", ";", "mainloop", ":", "for", "(", "int", "i", "=", "start", ";", "i", "<", "arra...
Returns the count of elements in arra from position start that are among the elements of arrb. Stops at any element not in arrb.
[ "Returns", "the", "count", "of", "elements", "in", "arra", "from", "position", "start", "that", "are", "among", "the", "elements", "of", "arrb", ".", "Stops", "at", "any", "element", "not", "in", "arrb", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/lib/ArrayUtil.java#L754-L773
62,289
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/lib/ArrayUtil.java
ArrayUtil.arraySlice
public static int[] arraySlice(int[] source, int start, int count) { int[] slice = new int[count]; System.arraycopy(source, start, slice, 0, count); return slice; }
java
public static int[] arraySlice(int[] source, int start, int count) { int[] slice = new int[count]; System.arraycopy(source, start, slice, 0, count); return slice; }
[ "public", "static", "int", "[", "]", "arraySlice", "(", "int", "[", "]", "source", ",", "int", "start", ",", "int", "count", ")", "{", "int", "[", "]", "slice", "=", "new", "int", "[", "count", "]", ";", "System", ".", "arraycopy", "(", "source", ...
Returns a range of elements of source from start to end of the array.
[ "Returns", "a", "range", "of", "elements", "of", "source", "from", "start", "to", "end", "of", "the", "array", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/lib/ArrayUtil.java#L817-L824
62,290
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/lib/ArrayUtil.java
ArrayUtil.fillArray
public static void fillArray(Object[] array, Object value) { int to = array.length; while (--to >= 0) { array[to] = value; } }
java
public static void fillArray(Object[] array, Object value) { int to = array.length; while (--to >= 0) { array[to] = value; } }
[ "public", "static", "void", "fillArray", "(", "Object", "[", "]", "array", ",", "Object", "value", ")", "{", "int", "to", "=", "array", ".", "length", ";", "while", "(", "--", "to", ">=", "0", ")", "{", "array", "[", "to", "]", "=", "value", ";",...
Fills the array with a value.
[ "Fills", "the", "array", "with", "a", "value", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/lib/ArrayUtil.java#L829-L836
62,291
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/lib/ArrayUtil.java
ArrayUtil.duplicateArray
public static Object duplicateArray(Object source) { int size = Array.getLength(source); Object newarray = Array.newInstance(source.getClass().getComponentType(), size); System.arraycopy(source, 0, newarray, 0, size); return newarray; }
java
public static Object duplicateArray(Object source) { int size = Array.getLength(source); Object newarray = Array.newInstance(source.getClass().getComponentType(), size); System.arraycopy(source, 0, newarray, 0, size); return newarray; }
[ "public", "static", "Object", "duplicateArray", "(", "Object", "source", ")", "{", "int", "size", "=", "Array", ".", "getLength", "(", "source", ")", ";", "Object", "newarray", "=", "Array", ".", "newInstance", "(", "source", ".", "getClass", "(", ")", "...
Returns a duplicates of an array.
[ "Returns", "a", "duplicates", "of", "an", "array", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/lib/ArrayUtil.java#L853-L862
62,292
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/lib/ArrayUtil.java
ArrayUtil.resizeArrayIfDifferent
public static Object resizeArrayIfDifferent(Object source, int newsize) { int oldsize = Array.getLength(source); if (oldsize == newsize) { return source; } Object newarray = Array.newInstance(source.getClass().getComponentType(), newsize); if (oldsize ...
java
public static Object resizeArrayIfDifferent(Object source, int newsize) { int oldsize = Array.getLength(source); if (oldsize == newsize) { return source; } Object newarray = Array.newInstance(source.getClass().getComponentType(), newsize); if (oldsize ...
[ "public", "static", "Object", "resizeArrayIfDifferent", "(", "Object", "source", ",", "int", "newsize", ")", "{", "int", "oldsize", "=", "Array", ".", "getLength", "(", "source", ")", ";", "if", "(", "oldsize", "==", "newsize", ")", "{", "return", "source"...
Returns the given array if newsize is the same as existing. Returns a new array of given size, containing as many elements of the original array as it can hold.
[ "Returns", "the", "given", "array", "if", "newsize", "is", "the", "same", "as", "existing", ".", "Returns", "a", "new", "array", "of", "given", "size", "containing", "as", "many", "elements", "of", "the", "original", "array", "as", "it", "can", "hold", "...
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/lib/ArrayUtil.java#L869-L887
62,293
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/lib/ArrayUtil.java
ArrayUtil.copyAdjustArray
public static void copyAdjustArray(Object source, Object dest, Object addition, int colindex, int adjust) { int length = Array.getLength(source); if (colindex < 0) { System.arraycopy(source, 0, dest, 0, length); ...
java
public static void copyAdjustArray(Object source, Object dest, Object addition, int colindex, int adjust) { int length = Array.getLength(source); if (colindex < 0) { System.arraycopy(source, 0, dest, 0, length); ...
[ "public", "static", "void", "copyAdjustArray", "(", "Object", "source", ",", "Object", "dest", ",", "Object", "addition", ",", "int", "colindex", ",", "int", "adjust", ")", "{", "int", "length", "=", "Array", ".", "getLength", "(", "source", ")", ";", "i...
Copies elements of source to dest. If adjust is -1 the element at colindex is not copied. If adjust is +1 that element is filled with the Object addition. All the rest of the elements in source are shifted left or right accordingly when they are copied. If adjust is 0 the addition is copied over the element at colindex...
[ "Copies", "elements", "of", "source", "to", "dest", ".", "If", "adjust", "is", "-", "1", "the", "element", "at", "colindex", "is", "not", "copied", ".", "If", "adjust", "is", "+", "1", "that", "element", "is", "filled", "with", "the", "Object", "additi...
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/lib/ArrayUtil.java#L938-L978
62,294
VoltDB/voltdb
src/frontend/org/voltdb/VoltTable.java
VoltTable.prependColumn
private static ColumnInfo[] prependColumn(ColumnInfo firstColumn, ColumnInfo[] columns) { int allLen = 1 + columns.length; ColumnInfo[] allColumns = new ColumnInfo[allLen]; allColumns[0] = firstColumn; for (int i = 0; i < columns.length; i++) { allColumns[i+1] = columns[i]; ...
java
private static ColumnInfo[] prependColumn(ColumnInfo firstColumn, ColumnInfo[] columns) { int allLen = 1 + columns.length; ColumnInfo[] allColumns = new ColumnInfo[allLen]; allColumns[0] = firstColumn; for (int i = 0; i < columns.length; i++) { allColumns[i+1] = columns[i]; ...
[ "private", "static", "ColumnInfo", "[", "]", "prependColumn", "(", "ColumnInfo", "firstColumn", ",", "ColumnInfo", "[", "]", "columns", ")", "{", "int", "allLen", "=", "1", "+", "columns", ".", "length", ";", "ColumnInfo", "[", "]", "allColumns", "=", "new...
Given a column and an array of columns, return a new array of columns with the single guy prepended onto the others. This function is used in the constructor below so that one constructor can call another without breaking Java rules about chained constructors being the first thing called.
[ "Given", "a", "column", "and", "an", "array", "of", "columns", "return", "a", "new", "array", "of", "columns", "with", "the", "single", "guy", "prepended", "onto", "the", "others", ".", "This", "function", "is", "used", "in", "the", "constructor", "below",...
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/VoltTable.java#L422-L430
62,295
VoltDB/voltdb
src/frontend/org/voltdb/VoltTable.java
VoltTable.getColumnName
public final String getColumnName(int index) { assert(verifyTableInvariants()); if ((index < 0) || (index >= m_colCount)) { throw new IllegalArgumentException("Not a valid column index."); } // move to the start of the list of column names int pos = POS_COL_TYPES + m...
java
public final String getColumnName(int index) { assert(verifyTableInvariants()); if ((index < 0) || (index >= m_colCount)) { throw new IllegalArgumentException("Not a valid column index."); } // move to the start of the list of column names int pos = POS_COL_TYPES + m...
[ "public", "final", "String", "getColumnName", "(", "int", "index", ")", "{", "assert", "(", "verifyTableInvariants", "(", ")", ")", ";", "if", "(", "(", "index", "<", "0", ")", "||", "(", "index", ">=", "m_colCount", ")", ")", "{", "throw", "new", "I...
Return the name of the column with the specified index. @param index Index of the column @return Name of the column with the specified index.
[ "Return", "the", "name", "of", "the", "column", "with", "the", "specified", "index", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/VoltTable.java#L639-L656
62,296
VoltDB/voltdb
src/frontend/org/voltdb/VoltTable.java
VoltTable.addRow
public final void addRow(Object... values) { assert(verifyTableInvariants()); if (m_readOnly) { throw new IllegalStateException("Table is read-only. Make a copy before changing."); } if (m_colCount == 0) { throw new IllegalStateException("Table has no columns defi...
java
public final void addRow(Object... values) { assert(verifyTableInvariants()); if (m_readOnly) { throw new IllegalStateException("Table is read-only. Make a copy before changing."); } if (m_colCount == 0) { throw new IllegalStateException("Table has no columns defi...
[ "public", "final", "void", "addRow", "(", "Object", "...", "values", ")", "{", "assert", "(", "verifyTableInvariants", "(", ")", ")", ";", "if", "(", "m_readOnly", ")", "{", "throw", "new", "IllegalStateException", "(", "\"Table is read-only. Make a copy before ch...
Append a new row to the table using the supplied column values. @param values Values of each column in the row. @throws VoltTypeException when there are casting/type failures between an input value and the corresponding column
[ "Append", "a", "new", "row", "to", "the", "table", "using", "the", "supplied", "column", "values", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/VoltTable.java#L1130-L1219
62,297
VoltDB/voltdb
src/frontend/org/voltdb/VoltTable.java
VoltTable.varbinaryToPrintableString
public static String varbinaryToPrintableString(byte[] bin) { PureJavaCrc32 crc = new PureJavaCrc32(); StringBuilder sb = new StringBuilder(); sb.append("bin[crc:"); crc.update(bin); sb.append(crc.getValue()); sb.append(",value:0x"); String hex = Encoder.hexEncode...
java
public static String varbinaryToPrintableString(byte[] bin) { PureJavaCrc32 crc = new PureJavaCrc32(); StringBuilder sb = new StringBuilder(); sb.append("bin[crc:"); crc.update(bin); sb.append(crc.getValue()); sb.append(",value:0x"); String hex = Encoder.hexEncode...
[ "public", "static", "String", "varbinaryToPrintableString", "(", "byte", "[", "]", "bin", ")", "{", "PureJavaCrc32", "crc", "=", "new", "PureJavaCrc32", "(", ")", ";", "StringBuilder", "sb", "=", "new", "StringBuilder", "(", ")", ";", "sb", ".", "append", ...
Make a printable, short string for a varbinary. String includes a CRC and the contents of the varbinary in hex. Contents longer than 13 chars are truncated and elipsized. Yes, "elipsized" is totally a word. Example: "bin[crc:1298399436,value:0xABCDEF12345...]" @param bin The bytes to print out. @return A string repre...
[ "Make", "a", "printable", "short", "string", "for", "a", "varbinary", ".", "String", "includes", "a", "CRC", "and", "the", "contents", "of", "the", "varbinary", "in", "hex", ".", "Contents", "longer", "than", "13", "chars", "are", "truncated", "and", "elip...
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/VoltTable.java#L1550-L1567
62,298
VoltDB/voltdb
src/frontend/org/voltdb/VoltTable.java
VoltTable.toJSONString
@Override public String toJSONString() { JSONStringer js = new JSONStringer(); try { js.object(); // status code (1 byte) js.keySymbolValuePair(JSON_STATUS_KEY, getStatusCode()); // column schema js.key(JSON_SCHEMA_KEY).array(); ...
java
@Override public String toJSONString() { JSONStringer js = new JSONStringer(); try { js.object(); // status code (1 byte) js.keySymbolValuePair(JSON_STATUS_KEY, getStatusCode()); // column schema js.key(JSON_SCHEMA_KEY).array(); ...
[ "@", "Override", "public", "String", "toJSONString", "(", ")", "{", "JSONStringer", "js", "=", "new", "JSONStringer", "(", ")", ";", "try", "{", "js", ".", "object", "(", ")", ";", "// status code (1 byte)", "js", ".", "keySymbolValuePair", "(", "JSON_STATUS...
Get a JSON representation of this table. @return A string containing a JSON representation of this table.
[ "Get", "a", "JSON", "representation", "of", "this", "table", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/VoltTable.java#L1722-L1762
62,299
VoltDB/voltdb
src/frontend/org/voltdb/VoltTable.java
VoltTable.fromJSONString
public static VoltTable fromJSONString(String json) throws JSONException, IOException { JSONObject jsonObj = new JSONObject(json); return fromJSONObject(jsonObj); }
java
public static VoltTable fromJSONString(String json) throws JSONException, IOException { JSONObject jsonObj = new JSONObject(json); return fromJSONObject(jsonObj); }
[ "public", "static", "VoltTable", "fromJSONString", "(", "String", "json", ")", "throws", "JSONException", ",", "IOException", "{", "JSONObject", "jsonObj", "=", "new", "JSONObject", "(", "json", ")", ";", "return", "fromJSONObject", "(", "jsonObj", ")", ";", "...
Construct a table from a JSON string. Only parses VoltDB VoltTable JSON format. @param json String containing JSON-formatted table data. @return Constructed <code>VoltTable</code> instance. @throws JSONException on JSON-related error. @throws IOException if thrown by our JSON library.
[ "Construct", "a", "table", "from", "a", "JSON", "string", ".", "Only", "parses", "VoltDB", "VoltTable", "JSON", "format", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/VoltTable.java#L1794-L1797