code stringlengths 73 34.1k | label stringclasses 1
value |
|---|---|
@Override
public String describe(Session session) {
try {
return describeImpl(session);
}
catch (Exception e) {
e.printStackTrace();
return e.toString();
}
} | java |
static boolean isGroupByColumn(QuerySpecification select, int index) {
if (!select.isGrouped) {
return false;
}
for (int ii = 0; ii < select.groupIndex.getColumnCount(); ii++) {
if (index == select.groupIndex.getColumns()[ii]) {
return true;
}
... | java |
private static List<Expression> getDisplayColumnsForSetOp(QueryExpression queryExpr) {
assert(queryExpr != null);
if (queryExpr.getLeftQueryExpression() == null) {
// end of recursion. This is a QuerySpecification
assert(queryExpr instanceof QuerySpecification);
Query... | java |
protected static List<VoltXMLElement> voltGetLimitOffsetXMLFromSortAndSlice(Session session, SortAndSlice sortAndSlice)
throws HSQLParseException {
List<VoltXMLElement> result = new ArrayList<>();
if (sortAndSlice == null || sortAndSlice == SortAndSlice.noSort) {
return result;
... | java |
public static Object getObjectFromString(VoltType type, String value)
throws ParseException
{
Object ret = null;
switch (type) {
// NOTE: All runtime integer parameters are actually Longs,so we will have problems
// if we actually try to convert the object to one of the s... | java |
public static VoltType getNumericLiteralType(VoltType vt, String value) {
try {
Long.parseLong(value);
} catch (NumberFormatException e) {
// Our DECIMAL may not be bigger/smaller enough to store the constant value
return VoltType.DECIMAL;
}
return vt;... | java |
private static void writeLength(ByteBuffer buf, int length) {
assert(length >= 0);
assert(length == (length & (~length + 1))); // check if power of two
// shockingly fast log_2 uses intrinsics in JDK >= 1.7
byte log2size = (byte) (32 - Integer.numberOfLeadingZeros(length));
buf... | java |
public OpsAgent getAgent(OpsSelector selector) {
OpsAgent agent = m_agents.get(selector);
assert (agent != null);
return agent;
} | java |
public void shutdown() {
for (Entry<OpsSelector, OpsAgent> entry : m_agents.entrySet()) {
try {
entry.getValue().shutdown();
}
catch (InterruptedException e) {}
}
m_agents.clear();
} | java |
public String add(ProcedureDescriptor descriptor) throws VoltCompilerException
{
assert descriptor != null;
String className = descriptor.m_className;
assert className != null && ! className.trim().isEmpty();
String shortName = deriveShortProcedureName(className);
if( m_pr... | java |
public void removeProcedure(String procName, boolean ifExists) throws VoltCompilerException
{
assert procName != null && ! procName.trim().isEmpty();
String shortName = deriveShortProcedureName(procName);
if( m_procedureMap.containsKey(shortName)) {
m_procedureMap.remove(shortN... | java |
public void addProcedurePartitionInfoTo(String procedureName, ProcedurePartitionData data)
throws VoltCompilerException {
ProcedureDescriptor descriptor = m_procedureMap.get(procedureName);
if( descriptor == null) {
throw m_compiler.new VoltCompilerException(String.format(
... | java |
void addExportedTable(String tableName, String targetName, boolean isStream) {
assert tableName != null && ! tableName.trim().isEmpty();
assert targetName != null && ! targetName.trim().isEmpty();
// store uppercase in the catalog as typename
targetName = targetName.toUpperCase();
... | java |
static <E> ImmutableList<E> asImmutableList(Object[] elements, int length) {
switch (length) {
case 0:
return of();
case 1:
@SuppressWarnings("unchecked") // collection had only Es in it
ImmutableList<E> list = new SingletonImmutableList<E>((E) elements[0]);
return list;
... | java |
@CanIgnoreReturnValue // TODO(kak): Consider removing this
public <E extends T> E min(Iterable<E> iterable) {
return min(iterable.iterator());
} | java |
static long calculateAverage(long currAvg, long currInvoc, long rowAvg, long rowInvoc)
{
long currTtl = currAvg * currInvoc;
long rowTtl = rowAvg * rowInvoc;
// If both are 0, then currTtl, rowTtl are also 0.
if ((currInvoc + rowInvoc) == 0L) {
return 0L;
} else ... | java |
static void addToRecentConnectionSettings(Hashtable settings,
ConnectionSetting newSetting) throws IOException {
settings.put(newSetting.getName(), newSetting);
ConnectionDialogCommon.storeRecentConnectionSettings(settings);
} | java |
private static void storeRecentConnectionSettings(Hashtable settings) {
try {
if (recentSettings == null) {
setHomeDir();
if (homedir == null) {
return;
}
recentSettings = new File(homedir, fileName);
... | java |
static void deleteRecentConnectionSettings() {
try {
if (recentSettings == null) {
setHomeDir();
if (homedir == null) {
return;
}
recentSettings = new File(homedir, fileName);
}
if (!recen... | java |
public Map<Integer, ClientAffinityStats> getAffinityStats()
{
Map<Integer, ClientAffinityStats> retval = new TreeMap<Integer, ClientAffinityStats>();
for (Entry<Integer, ClientAffinityStats> e : m_currentAffinity.entrySet()) {
if (m_baselineAffinity.containsKey(e.getKey())) {
... | java |
public ClientAffinityStats getAggregateAffinityStats()
{
long afWrites = 0;
long afReads = 0;
long rrWrites = 0;
long rrReads = 0;
Map<Integer, ClientAffinityStats> affinityStats = getAffinityStats();
for (Entry<Integer, ClientAffinityStats> e : affinityStats.entrySet... | java |
public static HSQLDDLInfo preprocessHSQLDDL(String ddl) {
ddl = SQLLexer.stripComments(ddl);
Matcher matcher = HSQL_DDL_PREPROCESSOR.matcher(ddl);
if (matcher.find()) {
String verbString = matcher.group("verb");
HSQLDDLInfo.Verb verb = HSQLDDLInfo.Verb.get(verbString);
... | java |
public void doRestart(List<Long> masters, Map<Integer, Long> partitionMasters)
{
List<Long> copy = new ArrayList<Long>(masters);
m_restartMasters.set(copy);
m_restartMastersMap.set(Maps.newHashMap(partitionMasters));
} | java |
public boolean activate(SystemProcedureExecutionContext context, boolean undo, byte[] predicates)
{
if (!context.activateTableStream(m_tableId, m_type, undo, predicates)) {
String tableName = CatalogUtil.getTableNameFromId(context.getDatabase(), m_tableId);
log.debug("Attempted to ac... | java |
public Pair<ListenableFuture<?>, Boolean> streamMore(SystemProcedureExecutionContext context,
List<DBBPool.BBContainer> outputBuffers,
int[] rowCountAccumulator)
{
ListenableFuture<?> writeFuture = nu... | java |
private void prepareBuffers(List<DBBPool.BBContainer> buffers)
{
Preconditions.checkArgument(buffers.size() == m_tableTasks.size());
UnmodifiableIterator<SnapshotTableTask> iterator = m_tableTasks.iterator();
for (DBBPool.BBContainer container : buffers) {
int headerSize = itera... | java |
private ListenableFuture<?> writeBlocksToTargets(Collection<DBBPool.BBContainer> outputBuffers,
int[] serialized)
{
Preconditions.checkArgument(m_tableTasks.size() == serialized.length);
Preconditions.checkArgument(outputBuffers.size() == serializ... | java |
public void recordValue(final long value) throws ArrayIndexOutOfBoundsException {
long criticalValueAtEnter = recordingPhaser.writerCriticalSectionEnter();
try {
activeHistogram.recordValue(value);
} finally {
recordingPhaser.writerCriticalSectionExit(criticalValueAtEnter... | java |
public static <K, V> HashBiMap<K, V> create(int expectedSize) {
return new HashBiMap<K, V>(expectedSize);
} | java |
public void repairSurvivors()
{
// cancel() and repair() must be synchronized by the caller (the deliver lock,
// currently). If cancelled and the last repair message arrives, don't send
// out corrections!
if (this.m_promotionResult.isCancelled()) {
repairLogger.debug(m_... | java |
void init(ResultMetaData meta, HsqlProperties props) throws SQLException {
resultMetaData = meta;
columnCount = resultMetaData.getColumnCount();
// fredt - props is null for internal connections, so always use the
// default behaviour in this case
// JDBCDriver.get... | java |
Map<Long, Long> reconfigureOnFault(Set<Long> hsIds, FaultMessage fm) {
return reconfigureOnFault(hsIds, fm, new HashSet<Long>());
} | java |
public Map<Long, Long> reconfigureOnFault(Set<Long> hsIds, FaultMessage fm, Set<Long> unknownFaultedSites) {
boolean proceed = false;
do {
Discard ignoreIt = mayIgnore(hsIds, fm);
if (Discard.DoNot == ignoreIt) {
m_inTrouble.put(fm.failedSite, fm.witnessed || fm.d... | java |
public static AbstractExpression createIndexExpressionForTable(Table table, Map<Integer, Integer> ranges)
{
HashRangeExpression predicate = new HashRangeExpression();
predicate.setRanges(ranges);
predicate.setHashColumnIndex(table.getPartitioncolumn().getIndex());
return predicate;
... | java |
public void initialize() throws Exception {
List<Long> acctList = new ArrayList<Long>(config.custcount*2);
List<String> stList = new ArrayList<String>(config.custcount*2);
// generate customers
System.out.println("generating " + config.custcount + " customers...");
for (int c=0... | java |
public static void createHierarchy(ZooKeeper zk) {
LinkedList<ZKUtil.StringCallback> callbacks = new LinkedList<ZKUtil.StringCallback>();
for (String node : CoreZK.ZK_HIERARCHY) {
ZKUtil.StringCallback cb = new ZKUtil.StringCallback();
callbacks.add(cb);
z... | java |
public static int createRejoinNodeIndicator(ZooKeeper zk, int hostId)
{
try {
zk.create(rejoin_node_blocker,
ByteBuffer.allocate(4).putInt(hostId).array(),
Ids.OPEN_ACL_UNSAFE,
CreateMode.PERSISTENT);
} catch (KeeperExcept... | java |
public static boolean removeRejoinNodeIndicatorForHost(ZooKeeper zk, int hostId)
{
try {
Stat stat = new Stat();
final int rejoiningHost = ByteBuffer.wrap(zk.getData(rejoin_node_blocker, false, stat)).getInt();
if (hostId == rejoiningHost) {
zk.delete(rejo... | java |
public static boolean removeJoinNodeIndicatorForHost(ZooKeeper zk, int hostId)
{
try {
Stat stat = new Stat();
String path = ZKUtil.joinZKPath(readyjoininghosts, Integer.toString(hostId));
zk.getData(path, false, stat);
zk.delete(path, stat.getVersion());
... | java |
public static boolean isPartitionCleanupInProgress(ZooKeeper zk) throws KeeperException, InterruptedException
{
List<String> children = zk.getChildren(VoltZK.leaders_initiators, null);
List<ZKUtil.ChildrenCallback> childrenCallbacks = Lists.newArrayList();
for (String child : children) {
... | java |
public boolean isNullable() {
boolean isNullable = super.isNullable();
if (isNullable) {
if (dataType.isDomainType()) {
return dataType.userTypeModifier.isNullable();
}
}
return isNullable;
} | java |
Object getDefaultValue(Session session) {
return defaultExpression == null ? null
: defaultExpression.getValue(session,
dataType);
} | java |
Object getGeneratedValue(Session session) {
return generatingExpression == null ? null
: generatingExpression.getValue(
session, dataType);
} | java |
public String getDefaultSQL() {
String ddl = null;
ddl = defaultExpression == null ? null
: defaultExpression.getSQL();
return ddl;
} | java |
Expression getDefaultExpression() {
if (defaultExpression == null) {
if (dataType.isDomainType()) {
return dataType.userTypeModifier.getDefaultClause();
}
return null;
} else {
return defaultExpression;
}
} | java |
public static ZKUtil.StringCallback createSnapshotCompletionNode(String path,
String pathType,
String nonce,
long... | java |
public static void logParticipatingHostCount(long txnId, int participantCount) {
ZooKeeper zk = VoltDB.instance().getHostMessenger().getZK();
final String snapshotPath = VoltZK.completed_snapshots + "/" + txnId;
boolean success = false;
while (!success) {
Stat stat = new Sta... | java |
public synchronized void close() {
this.isPoolClosed = true;
while (this.connectionsInactive.size() > 0) {
PooledConnection connection = dequeueFirstIfAny();
if (connection != null) {
closePhysically(
connection,
"closing... | java |
public synchronized void closeImmediatedly() {
close();
Iterator iterator = this.connectionsInUse.iterator();
while (iterator.hasNext()) {
PooledConnection connection = (PooledConnection) iterator.next();
SessionConnectionWrapper sessionWrapper =
(Sessi... | java |
public void setDriverClassName(String driverClassName) {
if (driverClassName.equals(JDBCConnectionPoolDataSource.driver)) {
return;
}
/** @todo: Use a HSQLDB RuntimeException subclass */
throw new RuntimeException("This class only supports JDBC driver '"
... | java |
@Override
public void toJSONString(JSONStringer stringer) throws JSONException {
super.toJSONString(stringer);
stringer.key("AGGREGATE_COLUMNS")
.array();
for (int ii = 0; ii < m_aggregateTypes.size(); ii++) {
stringer.object();
stringer.keySymbolValue... | java |
@Override
public void loadFromJSONObject(JSONObject jobj, Database db)
throws JSONException {
helpLoadFromJSONObject(jobj, db);
JSONArray jarray = jobj.getJSONArray( Members.AGGREGATE_COLUMNS.name() );
int size = jarray.length();
for (int i = 0; i < size; i++) {
... | java |
@Override
public void run() {
Thread.currentThread().setName("Latency Watchdog");
LOG.info(String.format("Latency Watchdog enabled -- threshold:%d(ms) " +
"wakeup_interval:%d(ms) min_log_interval:%d(ms)\n",
WATCHDOG_THRESHOLD, WAKEUP_INTE... | java |
public static ProcedurePartitionData fromPartitionInfoString(String partitionInfoString) {
if (partitionInfoString == null || partitionInfoString.trim().isEmpty()) {
return new ProcedurePartitionData();
}
String[] partitionInfoParts = new String[0];
partitionInfoParts = part... | java |
@Override
public void runDDL(String ddl) {
String modifiedDdl = transformDDL(ddl);
printTransformedSql(ddl, modifiedDdl);
super.runDDL(modifiedDdl, false);
} | java |
public void allHostNTProcedureCallback(ClientResponse clientResponse) {
synchronized(m_allHostCallbackLock) {
int hostId = Integer.parseInt(clientResponse.getAppStatusString());
boolean removed = m_outstandingAllHostProcedureHostIds.remove(hostId);
// log this for now... I do... | java |
protected CompletableFuture<Map<Integer,ClientResponse>> callAllNodeNTProcedure(String procName, Object... params) {
// only one of these at a time
if (!m_outstandingAllHostProc.compareAndSet(false, true)) {
throw new VoltAbortException(new IllegalStateException("Only one AllNodeNTProcedure ... | java |
private void completeCall(ClientResponseImpl response) {
// if we're keeping track, calculate result size
if (m_perCallStats.samplingProcedure()) {
m_perCallStats.setResultSize(response.getResults());
}
m_statsCollector.endProcedure(response.getStatus() == ClientResponse.USER... | java |
public void processAnyCallbacksFromFailedHosts(Set<Integer> failedHosts) {
synchronized(m_allHostCallbackLock) {
failedHosts.stream()
.forEach(i -> {
if (m_outstandingAllHostProcedureHostIds.contains(i)) {
ClientResponseImpl cri = new Clien... | java |
public final static void log(int logger, int level, String statement) {
if (logger < loggers.length) {
switch (level) {
case trace:
loggers[logger].trace(statement);
break;
case debug:
loggers[logger].debug(statement);
... | java |
public static void restoreFile(String sourceName,
String destName) throws IOException {
RandomAccessFile source = new RandomAccessFile(sourceName, "r");
RandomAccessFile dest = new RandomAccessFile(destName, "rw");
while (source.getFilePointer() != source.l... | java |
String getHTMLForAdminPage(Map<String,String> params) {
try {
String template = m_htmlTemplates.get("admintemplate.html");
for (Entry<String, String> e : params.entrySet()) {
String key = e.getKey().toUpperCase();
String value = e.getValue();
... | java |
public void start() throws InterruptedException, ExecutionException {
Future<?> task = es.submit(handlePartitionChange);
task.get();
} | java |
public static Long update(final long now) {
final long estNow = EstTime.m_now;
if (estNow == now) {
return null;
}
EstTime.m_now = now;
/*
* Check if updating the estimated time was especially tardy.
* I am concerned that the thread responsible for... | java |
StatementDMQL compileMigrateStatement(RangeVariable[] outerRanges) {
final Expression condition;
assert token.tokenType == Tokens.MIGRATE;
read();
readThis(Tokens.FROM);
RangeVariable[] rangeVariables = { readSimpleRangeVariable(StatementTypes.MIGRATE_WHERE) };
Table ta... | java |
StatementDMQL compileDeleteStatement(RangeVariable[] outerRanges) {
Expression condition = null;
boolean truncate = false;
boolean restartIdentity = false;
switch (token.tokenType) {
case Tokens.TRUNCATE : {
read();
readTh... | java |
StatementDMQL compileUpdateStatement(RangeVariable[] outerRanges) {
read();
Expression[] updateExpressions;
int[] columnMap;
boolean[] columnCheckList;
OrderedHashSet colNames = new OrderedHashSet();
HsqlArrayList exprList = new HsqlArrayList();
... | java |
private void readMergeWhen(OrderedHashSet insertColumnNames,
OrderedHashSet updateColumnNames,
HsqlArrayList insertExpressions,
HsqlArrayList updateExpressions,
RangeVariable[] targetRangeVars,
... | java |
StatementDMQL compileCallStatement(RangeVariable[] outerRanges,
boolean isStrictlyProcedure) {
read();
if (isIdentifier()) {
checkValidCatalogName(token.namePrePrefix);
RoutineSchema routineSchema =
(RoutineSchema) databas... | java |
private SortAndSlice voltGetSortAndSliceForDelete(RangeVariable[] rangeVariables) {
SortAndSlice sas = XreadOrderByExpression();
if (sas == null || sas == SortAndSlice.noSort)
return SortAndSlice.noSort;
// Resolve columns in the ORDER BY clause. This code modified
// from ... | java |
public ClassNameMatchStatus addPattern(String classNamePattern) {
boolean matchFound = false;
if (m_classList == null) {
m_classList = getClasspathClassFileNames();
}
String preppedName = classNamePattern.trim();
// include only full classes
// for nested cl... | java |
private static void processPathPart(String path, Set<String> classes) {
File rootFile = new File(path);
if (rootFile.isDirectory() == false) {
return;
}
File[] files = rootFile.listFiles();
for (File f : files) {
// classes in the anonymous package
... | java |
static String getClasspathClassFileNames() {
String classpath = System.getProperty("java.class.path");
String[] pathParts = classpath.split(File.pathSeparator);
Set<String> classes = new TreeSet<String>();
for (String part : pathParts) {
processPathPart(part, classes);
... | java |
double getMemoryLimitSize(String sizeStr)
{
if (sizeStr==null || sizeStr.length()==0) {
return 0;
}
try {
if (sizeStr.charAt(sizeStr.length()-1)=='%') { // size as a percentage of total available memory
int perc = Integer.parseInt(sizeStr.substring(0,... | java |
public static void validatePath(String path)
throws IllegalArgumentException {
if (path == null) {
throw new IllegalArgumentException("Path cannot be null");
}
if (path.length() == 0) {
throw new IllegalArgumentException("Path length must be > 0");
}
... | java |
protected void produceCopyForTransformation(AbstractPlanNode copy) {
copy.m_outputSchema = m_outputSchema;
copy.m_hasSignificantOutputSchema = m_hasSignificantOutputSchema;
copy.m_outputColumnHints = m_outputColumnHints;
copy.m_estimatedOutputTupleCount = m_estimatedOutputTupleCount;
... | java |
public void generateOutputSchema(Database db)
{
// default behavior: just copy the input schema
// to the output schema
assert(m_children.size() == 1);
AbstractPlanNode childNode = m_children.get(0);
childNode.generateOutputSchema(db);
// Replace the expressions in ou... | java |
public void getTablesAndIndexes(Map<String, StmtTargetTableScan> tablesRead,
Collection<String> indexes)
{
for (AbstractPlanNode node : m_inlineNodes.values()) {
node.getTablesAndIndexes(tablesRead, indexes);
}
for (AbstractPlanNode node : m_children) {
no... | java |
protected void getTablesAndIndexesFromSubqueries(Map<String, StmtTargetTableScan> tablesRead,
Collection<String> indexes) {
for(AbstractExpression expr : findAllSubquerySubexpressions()) {
assert(expr instanceof AbstractSubqueryExpression);
AbstractSubqueryExpression subquery... | java |
public boolean isOutputOrdered (List<AbstractExpression> sortExpressions, List<SortDirectionType> sortDirections) {
assert(sortExpressions.size() == sortDirections.size());
if (m_children.size() == 1) {
return m_children.get(0).isOutputOrdered(sortExpressions, sortDirections);
}
... | java |
public final NodeSchema getTrueOutputSchema(boolean resetBack) throws PlanningErrorException {
AbstractPlanNode child;
NodeSchema answer = null;
//
// Note: This code is translated from the C++ code in
// AbstractPlanNode::getOutputSchema. It's considerably
// ... | java |
public void addAndLinkChild(AbstractPlanNode child) {
assert(child != null);
m_children.add(child);
child.m_parents.add(this);
} | java |
public void setAndLinkChild(int index, AbstractPlanNode child) {
assert(child != null);
m_children.set(index, child);
child.m_parents.add(this);
} | java |
public void unlinkChild(AbstractPlanNode child) {
assert(child != null);
m_children.remove(child);
child.m_parents.remove(this);
} | java |
public boolean replaceChild(AbstractPlanNode oldChild, AbstractPlanNode newChild) {
assert(oldChild != null);
assert(newChild != null);
int idx = 0;
for (AbstractPlanNode child : m_children) {
if (child.equals(oldChild)) {
oldChild.m_parents.clear();
... | java |
public void addIntermediary(AbstractPlanNode node) {
// transfer this node's children to node
Iterator<AbstractPlanNode> it = m_children.iterator();
while (it.hasNext()) {
AbstractPlanNode child = it.next();
it.remove(); // remove this.child from... | java |
public boolean hasInlinedIndexScanOfTable(String tableName) {
for (int i = 0; i < getChildCount(); i++) {
AbstractPlanNode child = getChild(i);
if (child.hasInlinedIndexScanOfTable(tableName) == true) {
return true;
}
}
return false;
} | java |
protected void findAllExpressionsOfClass(Class< ? extends AbstractExpression> aeClass,
Set<AbstractExpression> collected) {
// Check the inlined plan nodes
for (AbstractPlanNode inlineNode: getInlinePlanNodes().values()) {
// For inline node we MUST go recursive to its children!!... | java |
public String toDOTString() {
StringBuilder sb = new StringBuilder();
// id [label=id: value-type <value-type-attributes>];
// id -> child_id;
// id -> child_id;
sb.append(m_id).append(" [label=\"").append(m_id).append(": ").append(getPlanNodeType()).append("\" ");
sb.a... | java |
private String getValueTypeDotString() {
PlanNodeType pnt = getPlanNodeType();
if (isInline()) {
return "fontcolor=\"white\" style=\"filled\" fillcolor=\"red\"";
}
if (pnt == PlanNodeType.SEND || pnt == PlanNodeType.RECEIVE || pnt == PlanNodeType.MERGERECEIVE) {
r... | java |
public void getScanNodeList_recurse(ArrayList<AbstractScanPlanNode> collected,
HashSet<AbstractPlanNode> visited) {
if (visited.contains(this)) {
assert(false): "do not expect loops in plangraph.";
return;
}
visited.add(this);
for (AbstractPlanNode n :... | java |
public void getPlanNodeList_recurse(ArrayList<AbstractPlanNode> collected,
HashSet<AbstractPlanNode> visited) {
if (visited.contains(this)) {
assert(false): "do not expect loops in plangraph.";
return;
}
visited.add(this);
for (AbstractPlanNode n : m_... | java |
private static Object nullValueForType(final Class<?> expectedClz)
{
if (expectedClz == long.class) {
return VoltType.NULL_BIGINT;
}
else if (expectedClz == int.class) {
return VoltType.NULL_INTEGER;
}
else if (expectedClz == short.class) {
... | java |
private static Object convertStringToPrimitiveOrPrimitiveWrapper(String value, final Class<?> expectedClz)
throws VoltTypeException
{
value = value.trim();
// detect CSV null
if (value.equals(Constants.CSV_NULL)) return nullValueForType(expectedClz);
// Remove commas. Doing thi... | java |
private static Object tryToMakeCompatibleArray(
final Class<?> expectedComponentClz,
final Class<?> inputComponentClz,
Object param)
throws VoltTypeException
{
int inputLength = Array.getLength(param);
if (inputComponentClz == expectedComponentClz) {
... | java |
final static public VoltTable[] getResultsFromRawResults(String procedureName, Object result) throws InvocationTargetException {
if (result == null) {
return new VoltTable[0];
}
if (result instanceof VoltTable[]) {
VoltTable[] retval = (VoltTable[]) result;
fo... | java |
public static void main(String[] args) {
if (args.length > 1) {
printUsage();
}
if (args.length == 0 || (args.length == 1 && args[0].equals("--full"))) {
System.out.println(getFullVersion());
System.exit(0);
}
if (args[0].equals("--short"))
... | java |
void setFinal(boolean isFinal) throws IOException {
if (isFinal != m_isFinal) {
if (PBDSegment.setFinal(m_file, isFinal)) {
if (!isFinal) {
// It is dangerous to leave final on a segment so make sure the metadata is flushed
m_fc.force(true);
... | java |
public static String createParticipantNode(ZooKeeper zk, String dir, String prefix, byte[] data)
throws KeeperException, InterruptedException
{
createRootIfNotExist(zk, dir);
String node = zk.create(ZKUtil.joinZKPath(dir, prefix + "_"), data,
Ids.OPEN_ACL_UNS... | java |
synchronized public void shutdown() throws InterruptedException, KeeperException {
m_shutdown = true;
es.shutdown();
es.awaitTermination(365, TimeUnit.DAYS);
} | java |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.