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
partition
stringclasses
1 value
moleculer-java/moleculer-java
src/main/java/services/moleculer/context/DefaultContextFactory.java
DefaultContextFactory.started
@Override public void started(ServiceBroker broker) throws Exception { super.started(broker); // Set components ServiceBrokerConfig cfg = broker.getConfig(); serviceInvoker = cfg.getServiceInvoker(); eventbus = cfg.getEventbus(); uid = cfg.getUidGenerator(); }
java
@Override public void started(ServiceBroker broker) throws Exception { super.started(broker); // Set components ServiceBrokerConfig cfg = broker.getConfig(); serviceInvoker = cfg.getServiceInvoker(); eventbus = cfg.getEventbus(); uid = cfg.getUidGenerator(); }
[ "@", "Override", "public", "void", "started", "(", "ServiceBroker", "broker", ")", "throws", "Exception", "{", "super", ".", "started", "(", "broker", ")", ";", "// Set components\r", "ServiceBrokerConfig", "cfg", "=", "broker", ".", "getConfig", "(", ")", ";"...
Initializes Default Context Factory instance. @param broker parent ServiceBroker
[ "Initializes", "Default", "Context", "Factory", "instance", "." ]
27575c44b9ecacc17c4456ceacf5d1851abf1cc4
https://github.com/moleculer-java/moleculer-java/blob/27575c44b9ecacc17c4456ceacf5d1851abf1cc4/src/main/java/services/moleculer/context/DefaultContextFactory.java#L65-L74
train
moleculer-java/moleculer-java
src/main/java/services/moleculer/eventbus/DefaultEventbus.java
DefaultEventbus.started
@Override public void started(ServiceBroker broker) throws Exception { super.started(broker); // Set nodeID this.nodeID = broker.getNodeID(); // Set components ServiceBrokerConfig cfg = broker.getConfig(); this.strategy = cfg.getStrategyFactory(); this.transporter = cfg.getTransporter(); this.executo...
java
@Override public void started(ServiceBroker broker) throws Exception { super.started(broker); // Set nodeID this.nodeID = broker.getNodeID(); // Set components ServiceBrokerConfig cfg = broker.getConfig(); this.strategy = cfg.getStrategyFactory(); this.transporter = cfg.getTransporter(); this.executo...
[ "@", "Override", "public", "void", "started", "(", "ServiceBroker", "broker", ")", "throws", "Exception", "{", "super", ".", "started", "(", "broker", ")", ";", "// Set nodeID", "this", ".", "nodeID", "=", "broker", ".", "getNodeID", "(", ")", ";", "// Set...
Initializes default EventBus instance. @param broker parent ServiceBroker
[ "Initializes", "default", "EventBus", "instance", "." ]
27575c44b9ecacc17c4456ceacf5d1851abf1cc4
https://github.com/moleculer-java/moleculer-java/blob/27575c44b9ecacc17c4456ceacf5d1851abf1cc4/src/main/java/services/moleculer/eventbus/DefaultEventbus.java#L130-L142
train
moleculer-java/moleculer-java
src/main/java/services/moleculer/transporter/tcp/SendBuffer.java
SendBuffer.append
protected boolean append(byte[] packet) { ByteBuffer buffer = ByteBuffer.wrap(packet); ByteBuffer blocker; while (true) { blocker = blockerBuffer.get(); if (blocker == BUFFER_IS_CLOSED) { return false; } if (blockerBuffer.compareAndSet(blocker, buffer)) { queue.add(buffer); retur...
java
protected boolean append(byte[] packet) { ByteBuffer buffer = ByteBuffer.wrap(packet); ByteBuffer blocker; while (true) { blocker = blockerBuffer.get(); if (blocker == BUFFER_IS_CLOSED) { return false; } if (blockerBuffer.compareAndSet(blocker, buffer)) { queue.add(buffer); retur...
[ "protected", "boolean", "append", "(", "byte", "[", "]", "packet", ")", "{", "ByteBuffer", "buffer", "=", "ByteBuffer", ".", "wrap", "(", "packet", ")", ";", "ByteBuffer", "blocker", ";", "while", "(", "true", ")", "{", "blocker", "=", "blockerBuffer", "...
Adds a packet to the buffer's queue. @param packet packet to write @return true, if success (false = buffer is closed)
[ "Adds", "a", "packet", "to", "the", "buffer", "s", "queue", "." ]
27575c44b9ecacc17c4456ceacf5d1851abf1cc4
https://github.com/moleculer-java/moleculer-java/blob/27575c44b9ecacc17c4456ceacf5d1851abf1cc4/src/main/java/services/moleculer/transporter/tcp/SendBuffer.java#L101-L114
train
moleculer-java/moleculer-java
src/main/java/services/moleculer/transporter/tcp/SendBuffer.java
SendBuffer.tryToClose
protected boolean tryToClose() { ByteBuffer blocker = blockerBuffer.get(); if (blocker == BUFFER_IS_CLOSED) { return true; } if (blocker != null) { return false; } boolean closed = blockerBuffer.compareAndSet(null, BUFFER_IS_CLOSED); if (closed) { closeResources(); return true; }...
java
protected boolean tryToClose() { ByteBuffer blocker = blockerBuffer.get(); if (blocker == BUFFER_IS_CLOSED) { return true; } if (blocker != null) { return false; } boolean closed = blockerBuffer.compareAndSet(null, BUFFER_IS_CLOSED); if (closed) { closeResources(); return true; }...
[ "protected", "boolean", "tryToClose", "(", ")", "{", "ByteBuffer", "blocker", "=", "blockerBuffer", ".", "get", "(", ")", ";", "if", "(", "blocker", "==", "BUFFER_IS_CLOSED", ")", "{", "return", "true", ";", "}", "if", "(", "blocker", "!=", "null", ")", ...
Tries to close this buffer. @return true, is closed (false = buffer is not empty)
[ "Tries", "to", "close", "this", "buffer", "." ]
27575c44b9ecacc17c4456ceacf5d1851abf1cc4
https://github.com/moleculer-java/moleculer-java/blob/27575c44b9ecacc17c4456ceacf5d1851abf1cc4/src/main/java/services/moleculer/transporter/tcp/SendBuffer.java#L123-L137
train
moleculer-java/moleculer-java
src/main/java/services/moleculer/transporter/tcp/SendBuffer.java
SendBuffer.write
protected void write() throws Exception { ByteBuffer buffer = queue.peek(); if (buffer == null) { if (key != null) { key.interestOps(0); } return; } if (channel != null) { int count; while (true) { count = channel.write(buffer); // Debug if (debug) { logger.in...
java
protected void write() throws Exception { ByteBuffer buffer = queue.peek(); if (buffer == null) { if (key != null) { key.interestOps(0); } return; } if (channel != null) { int count; while (true) { count = channel.write(buffer); // Debug if (debug) { logger.in...
[ "protected", "void", "write", "(", ")", "throws", "Exception", "{", "ByteBuffer", "buffer", "=", "queue", ".", "peek", "(", ")", ";", "if", "(", "buffer", "==", "null", ")", "{", "if", "(", "key", "!=", "null", ")", "{", "key", ".", "interestOps", ...
Writes N bytes to the target channel. @throws Exception any I/O exception
[ "Writes", "N", "bytes", "to", "the", "target", "channel", "." ]
27575c44b9ecacc17c4456ceacf5d1851abf1cc4
https://github.com/moleculer-java/moleculer-java/blob/27575c44b9ecacc17c4456ceacf5d1851abf1cc4/src/main/java/services/moleculer/transporter/tcp/SendBuffer.java#L182-L221
train
moleculer-java/moleculer-java
src/main/java/services/moleculer/transporter/Transporter.java
Transporter.started
@Override public void started(ServiceBroker broker) throws Exception { super.started(broker); // Process config ServiceBrokerConfig cfg = broker.getConfig(); namespace = cfg.getNamespace(); if (namespace != null && !namespace.isEmpty()) { prefix = prefix + '-' + namespace; } nodeID = broker...
java
@Override public void started(ServiceBroker broker) throws Exception { super.started(broker); // Process config ServiceBrokerConfig cfg = broker.getConfig(); namespace = cfg.getNamespace(); if (namespace != null && !namespace.isEmpty()) { prefix = prefix + '-' + namespace; } nodeID = broker...
[ "@", "Override", "public", "void", "started", "(", "ServiceBroker", "broker", ")", "throws", "Exception", "{", "super", ".", "started", "(", "broker", ")", ";", "// Process config\r", "ServiceBrokerConfig", "cfg", "=", "broker", ".", "getConfig", "(", ")", ";"...
Initializes transporter instance. @param broker parent ServiceBroker
[ "Initializes", "transporter", "instance", "." ]
27575c44b9ecacc17c4456ceacf5d1851abf1cc4
https://github.com/moleculer-java/moleculer-java/blob/27575c44b9ecacc17c4456ceacf5d1851abf1cc4/src/main/java/services/moleculer/transporter/Transporter.java#L200-L236
train
moleculer-java/moleculer-java
src/main/java/services/moleculer/service/DefaultServiceRegistry.java
DefaultServiceRegistry.started
@Override public void started(ServiceBroker broker) throws Exception { super.started(broker); // Local nodeID this.nodeID = broker.getNodeID(); // Set components ServiceBrokerConfig cfg = broker.getConfig(); this.executor = cfg.getExecutor(); this.scheduler = cfg.getScheduler(); this.strategyFactory ...
java
@Override public void started(ServiceBroker broker) throws Exception { super.started(broker); // Local nodeID this.nodeID = broker.getNodeID(); // Set components ServiceBrokerConfig cfg = broker.getConfig(); this.executor = cfg.getExecutor(); this.scheduler = cfg.getScheduler(); this.strategyFactory ...
[ "@", "Override", "public", "void", "started", "(", "ServiceBroker", "broker", ")", "throws", "Exception", "{", "super", ".", "started", "(", "broker", ")", ";", "// Local nodeID", "this", ".", "nodeID", "=", "broker", ".", "getNodeID", "(", ")", ";", "// S...
Initializes ServiceRegistry instance. @param broker parent ServiceBroker
[ "Initializes", "ServiceRegistry", "instance", "." ]
27575c44b9ecacc17c4456ceacf5d1851abf1cc4
https://github.com/moleculer-java/moleculer-java/blob/27575c44b9ecacc17c4456ceacf5d1851abf1cc4/src/main/java/services/moleculer/service/DefaultServiceRegistry.java#L235-L251
train
moleculer-java/moleculer-java
src/main/java/services/moleculer/service/DefaultServiceRegistry.java
DefaultServiceRegistry.reschedule
protected void reschedule(long minTimeoutAt) { if (minTimeoutAt == Long.MAX_VALUE) { for (PendingPromise pending : promises.values()) { if (pending.timeoutAt > 0 && pending.timeoutAt < minTimeoutAt) { minTimeoutAt = pending.timeoutAt; } } long timeoutAt; requestStreamReadLock.lock(); try {...
java
protected void reschedule(long minTimeoutAt) { if (minTimeoutAt == Long.MAX_VALUE) { for (PendingPromise pending : promises.values()) { if (pending.timeoutAt > 0 && pending.timeoutAt < minTimeoutAt) { minTimeoutAt = pending.timeoutAt; } } long timeoutAt; requestStreamReadLock.lock(); try {...
[ "protected", "void", "reschedule", "(", "long", "minTimeoutAt", ")", "{", "if", "(", "minTimeoutAt", "==", "Long", ".", "MAX_VALUE", ")", "{", "for", "(", "PendingPromise", "pending", ":", "promises", ".", "values", "(", ")", ")", "{", "if", "(", "pendin...
Recalculates the next timeout checking time. @param minTimeoutAt next / closest timestamp
[ "Recalculates", "the", "next", "timeout", "checking", "time", "." ]
27575c44b9ecacc17c4456ceacf5d1851abf1cc4
https://github.com/moleculer-java/moleculer-java/blob/27575c44b9ecacc17c4456ceacf5d1851abf1cc4/src/main/java/services/moleculer/service/DefaultServiceRegistry.java#L383-L445
train
moleculer-java/moleculer-java
src/main/java/services/moleculer/transporter/TcpTransporter.java
TcpTransporter.generateGossipHello
public byte[] generateGossipHello() { if (cachedHelloMessage != null) { return cachedHelloMessage; } try { FastBuildTree root = new FastBuildTree(4); root.putUnsafe("ver", ServiceBroker.PROTOCOL_VERSION); root.putUnsafe("sender", nodeID); if (useHostname) { root.putUnsafe("host", getHostName())...
java
public byte[] generateGossipHello() { if (cachedHelloMessage != null) { return cachedHelloMessage; } try { FastBuildTree root = new FastBuildTree(4); root.putUnsafe("ver", ServiceBroker.PROTOCOL_VERSION); root.putUnsafe("sender", nodeID); if (useHostname) { root.putUnsafe("host", getHostName())...
[ "public", "byte", "[", "]", "generateGossipHello", "(", ")", "{", "if", "(", "cachedHelloMessage", "!=", "null", ")", "{", "return", "cachedHelloMessage", ";", "}", "try", "{", "FastBuildTree", "root", "=", "new", "FastBuildTree", "(", "4", ")", ";", "root...
Create Gossip HELLO packet. Hello message is invariable, so we can cache it. @return created "hello" request
[ "Create", "Gossip", "HELLO", "packet", ".", "Hello", "message", "is", "invariable", "so", "we", "can", "cache", "it", "." ]
27575c44b9ecacc17c4456ceacf5d1851abf1cc4
https://github.com/moleculer-java/moleculer-java/blob/27575c44b9ecacc17c4456ceacf5d1851abf1cc4/src/main/java/services/moleculer/transporter/TcpTransporter.java#L1332-L1352
train
moleculer-java/moleculer-java
src/main/java/services/moleculer/ServiceBroker.java
ServiceBroker.use
public ServiceBroker use(Collection<Middleware> middlewares) { if (serviceRegistry == null) { // Apply middlewares later this.middlewares.addAll(middlewares); } else { // Apply middlewares now serviceRegistry.use(middlewares); } return this; }
java
public ServiceBroker use(Collection<Middleware> middlewares) { if (serviceRegistry == null) { // Apply middlewares later this.middlewares.addAll(middlewares); } else { // Apply middlewares now serviceRegistry.use(middlewares); } return this; }
[ "public", "ServiceBroker", "use", "(", "Collection", "<", "Middleware", ">", "middlewares", ")", "{", "if", "(", "serviceRegistry", "==", "null", ")", "{", "// Apply middlewares later", "this", ".", "middlewares", ".", "addAll", "(", "middlewares", ")", ";", "...
Installs a collection of middlewares. @param middlewares collection of middlewares @return this ServiceBroker instance (from "method chaining")
[ "Installs", "a", "collection", "of", "middlewares", "." ]
27575c44b9ecacc17c4456ceacf5d1851abf1cc4
https://github.com/moleculer-java/moleculer-java/blob/27575c44b9ecacc17c4456ceacf5d1851abf1cc4/src/main/java/services/moleculer/ServiceBroker.java#L652-L663
train
moleculer-java/moleculer-java
src/main/java/services/moleculer/ServiceBroker.java
ServiceBroker.getAction
public Action getAction(String actionName, String nodeID) { return serviceRegistry.getAction(actionName, nodeID); }
java
public Action getAction(String actionName, String nodeID) { return serviceRegistry.getAction(actionName, nodeID); }
[ "public", "Action", "getAction", "(", "String", "actionName", ",", "String", "nodeID", ")", "{", "return", "serviceRegistry", ".", "getAction", "(", "actionName", ",", "nodeID", ")", ";", "}" ]
Returns an action by name and nodeID. @param actionName name of the action (in "service.action" syntax, eg. "math.add") @param nodeID node identifier where the service is located @return local or remote action container
[ "Returns", "an", "action", "by", "name", "and", "nodeID", "." ]
27575c44b9ecacc17c4456ceacf5d1851abf1cc4
https://github.com/moleculer-java/moleculer-java/blob/27575c44b9ecacc17c4456ceacf5d1851abf1cc4/src/main/java/services/moleculer/ServiceBroker.java#L702-L704
train
moleculer-java/moleculer-java
src/main/java/services/moleculer/util/redis/RedisGetSetClient.java
RedisGetSetClient.get
public final Promise get(String key) { byte[] binaryKey = key.getBytes(StandardCharsets.UTF_8); if (client != null) { return new Promise(client.get(binaryKey)); } if (clusteredClient != null) { return new Promise(clusteredClient.get(binaryKey)); } return Promise.resolve(); }
java
public final Promise get(String key) { byte[] binaryKey = key.getBytes(StandardCharsets.UTF_8); if (client != null) { return new Promise(client.get(binaryKey)); } if (clusteredClient != null) { return new Promise(clusteredClient.get(binaryKey)); } return Promise.resolve(); }
[ "public", "final", "Promise", "get", "(", "String", "key", ")", "{", "byte", "[", "]", "binaryKey", "=", "key", ".", "getBytes", "(", "StandardCharsets", ".", "UTF_8", ")", ";", "if", "(", "client", "!=", "null", ")", "{", "return", "new", "Promise", ...
Gets a content by a key. @param key cache key @return Promise with cached value (or null, the returned Promise also can be null)
[ "Gets", "a", "content", "by", "a", "key", "." ]
27575c44b9ecacc17c4456ceacf5d1851abf1cc4
https://github.com/moleculer-java/moleculer-java/blob/27575c44b9ecacc17c4456ceacf5d1851abf1cc4/src/main/java/services/moleculer/util/redis/RedisGetSetClient.java#L98-L107
train
moleculer-java/moleculer-java
src/main/java/services/moleculer/util/redis/RedisGetSetClient.java
RedisGetSetClient.set
public final Promise set(String key, byte[] value, SetArgs args) { byte[] binaryKey = key.getBytes(StandardCharsets.UTF_8); if (client != null) { if (args == null) { return new Promise(client.set(binaryKey, value)); } return new Promise(client.set(binaryKey, value, args)); } if (clusteredCl...
java
public final Promise set(String key, byte[] value, SetArgs args) { byte[] binaryKey = key.getBytes(StandardCharsets.UTF_8); if (client != null) { if (args == null) { return new Promise(client.set(binaryKey, value)); } return new Promise(client.set(binaryKey, value, args)); } if (clusteredCl...
[ "public", "final", "Promise", "set", "(", "String", "key", ",", "byte", "[", "]", "value", ",", "SetArgs", "args", ")", "{", "byte", "[", "]", "binaryKey", "=", "key", ".", "getBytes", "(", "StandardCharsets", ".", "UTF_8", ")", ";", "if", "(", "clie...
Sets a content by key. @param key cache key @param value new value @param args Redis arguments (eg. TTL) @return Promise with empty value
[ "Sets", "a", "content", "by", "key", "." ]
27575c44b9ecacc17c4456ceacf5d1851abf1cc4
https://github.com/moleculer-java/moleculer-java/blob/27575c44b9ecacc17c4456ceacf5d1851abf1cc4/src/main/java/services/moleculer/util/redis/RedisGetSetClient.java#L121-L136
train
moleculer-java/moleculer-java
src/main/java/services/moleculer/util/redis/RedisGetSetClient.java
RedisGetSetClient.clean
public final Promise clean(String match) { ScanArgs args = new ScanArgs(); args.limit(100); boolean singleStar = match.indexOf('*') > -1; boolean doubleStar = match.contains("**"); if (doubleStar) { args.match(match.replace("**", "*")); } else if (singleStar) { if (match.length() > 1 && match....
java
public final Promise clean(String match) { ScanArgs args = new ScanArgs(); args.limit(100); boolean singleStar = match.indexOf('*') > -1; boolean doubleStar = match.contains("**"); if (doubleStar) { args.match(match.replace("**", "*")); } else if (singleStar) { if (match.length() > 1 && match....
[ "public", "final", "Promise", "clean", "(", "String", "match", ")", "{", "ScanArgs", "args", "=", "new", "ScanArgs", "(", ")", ";", "args", ".", "limit", "(", "100", ")", ";", "boolean", "singleStar", "=", "match", ".", "indexOf", "(", "'", "'", ")",...
Deletes a group of items. Removes every key by a match string. @param match regex @return Promise with empty value
[ "Deletes", "a", "group", "of", "items", ".", "Removes", "every", "key", "by", "a", "match", "string", "." ]
27575c44b9ecacc17c4456ceacf5d1851abf1cc4
https://github.com/moleculer-java/moleculer-java/blob/27575c44b9ecacc17c4456ceacf5d1851abf1cc4/src/main/java/services/moleculer/util/redis/RedisGetSetClient.java#L165-L190
train
moleculer-java/moleculer-java
src/main/java/services/moleculer/monitor/Monitor.java
Monitor.getTotalCpuPercent
public int getTotalCpuPercent() { if (invalidMonitor.get()) { return 0; } long now = System.currentTimeMillis(); int cpu; synchronized (Monitor.class) { if (now - cpuDetectedAt > cacheTimeout) { try { cachedCPU = detectTotalCpuPercent(); } catch (Throwable cause) { logger.in...
java
public int getTotalCpuPercent() { if (invalidMonitor.get()) { return 0; } long now = System.currentTimeMillis(); int cpu; synchronized (Monitor.class) { if (now - cpuDetectedAt > cacheTimeout) { try { cachedCPU = detectTotalCpuPercent(); } catch (Throwable cause) { logger.in...
[ "public", "int", "getTotalCpuPercent", "(", ")", "{", "if", "(", "invalidMonitor", ".", "get", "(", ")", ")", "{", "return", "0", ";", "}", "long", "now", "=", "System", ".", "currentTimeMillis", "(", ")", ";", "int", "cpu", ";", "synchronized", "(", ...
Returns the cached system CPU usage, in percents, between 0 and 100. @return total CPU usage of the current OS
[ "Returns", "the", "cached", "system", "CPU", "usage", "in", "percents", "between", "0", "and", "100", "." ]
27575c44b9ecacc17c4456ceacf5d1851abf1cc4
https://github.com/moleculer-java/moleculer-java/blob/27575c44b9ecacc17c4456ceacf5d1851abf1cc4/src/main/java/services/moleculer/monitor/Monitor.java#L82-L101
train
moleculer-java/moleculer-java
src/main/java/services/moleculer/monitor/Monitor.java
Monitor.getPID
public long getPID() { long currentPID = cachedPID.get(); if (currentPID != 0) { return currentPID; } try { currentPID = detectPID(); } catch (Throwable cause) { logger.info("Unable to detect process ID!", cause); } if (currentPID == 0) { currentPID = System.nanoTime(); if (!cac...
java
public long getPID() { long currentPID = cachedPID.get(); if (currentPID != 0) { return currentPID; } try { currentPID = detectPID(); } catch (Throwable cause) { logger.info("Unable to detect process ID!", cause); } if (currentPID == 0) { currentPID = System.nanoTime(); if (!cac...
[ "public", "long", "getPID", "(", ")", "{", "long", "currentPID", "=", "cachedPID", ".", "get", "(", ")", ";", "if", "(", "currentPID", "!=", "0", ")", "{", "return", "currentPID", ";", "}", "try", "{", "currentPID", "=", "detectPID", "(", ")", ";", ...
Returns the cached PID of Java VM. @return current Java VM's process ID
[ "Returns", "the", "cached", "PID", "of", "Java", "VM", "." ]
27575c44b9ecacc17c4456ceacf5d1851abf1cc4
https://github.com/moleculer-java/moleculer-java/blob/27575c44b9ecacc17c4456ceacf5d1851abf1cc4/src/main/java/services/moleculer/monitor/Monitor.java#L108-L127
train
moleculer-java/moleculer-java
src/main/java/services/moleculer/stream/IncomingStream.java
IncomingStream.reset
public synchronized void reset() { timeoutAt = 0; prevSeq = -1; pool.clear(); stream.closed.set(false); stream.buffer.clear(); stream.cause = null; stream.transferedBytes.set(0); inited.set(false); }
java
public synchronized void reset() { timeoutAt = 0; prevSeq = -1; pool.clear(); stream.closed.set(false); stream.buffer.clear(); stream.cause = null; stream.transferedBytes.set(0); inited.set(false); }
[ "public", "synchronized", "void", "reset", "(", ")", "{", "timeoutAt", "=", "0", ";", "prevSeq", "=", "-", "1", ";", "pool", ".", "clear", "(", ")", ";", "stream", ".", "closed", ".", "set", "(", "false", ")", ";", "stream", ".", "buffer", ".", "...
Used for testing. Resets internal variables.
[ "Used", "for", "testing", ".", "Resets", "internal", "variables", "." ]
27575c44b9ecacc17c4456ceacf5d1851abf1cc4
https://github.com/moleculer-java/moleculer-java/blob/27575c44b9ecacc17c4456ceacf5d1851abf1cc4/src/main/java/services/moleculer/stream/IncomingStream.java#L83-L92
train
moleculer-java/moleculer-java
src/main/java/services/moleculer/uid/IncrementalUidGenerator.java
IncrementalUidGenerator.started
@Override public void started(ServiceBroker broker) throws Exception { super.started(broker); if (prefix == null) { prefix = (broker.getNodeID() + ':').toCharArray(); } }
java
@Override public void started(ServiceBroker broker) throws Exception { super.started(broker); if (prefix == null) { prefix = (broker.getNodeID() + ':').toCharArray(); } }
[ "@", "Override", "public", "void", "started", "(", "ServiceBroker", "broker", ")", "throws", "Exception", "{", "super", ".", "started", "(", "broker", ")", ";", "if", "(", "prefix", "==", "null", ")", "{", "prefix", "=", "(", "broker", ".", "getNodeID", ...
Initializes UID generator instance. @param broker parent ServiceBroker
[ "Initializes", "UID", "generator", "instance", "." ]
27575c44b9ecacc17c4456ceacf5d1851abf1cc4
https://github.com/moleculer-java/moleculer-java/blob/27575c44b9ecacc17c4456ceacf5d1851abf1cc4/src/main/java/services/moleculer/uid/IncrementalUidGenerator.java#L63-L69
train
QSFT/Doradus
doradus-client/src/main/java/com/dell/doradus/client/ApplicationSession.java
ApplicationSession.updateSchema
public boolean updateSchema(String text, ContentType contentType) { Utils.require(text != null && text.length() > 0, "text"); Utils.require(contentType != null, "contentType"); try { // Send a PUT request to "/_applications/{application}". byte[] body = Uti...
java
public boolean updateSchema(String text, ContentType contentType) { Utils.require(text != null && text.length() > 0, "text"); Utils.require(contentType != null, "contentType"); try { // Send a PUT request to "/_applications/{application}". byte[] body = Uti...
[ "public", "boolean", "updateSchema", "(", "String", "text", ",", "ContentType", "contentType", ")", "{", "Utils", ".", "require", "(", "text", "!=", "null", "&&", "text", ".", "length", "(", ")", ">", "0", ",", "\"text\"", ")", ";", "Utils", ".", "requ...
Update the schema for this session's application with the given definition. The text must be formatted in XML or JSON, as defined by the given content type. True is returned if the update was successful. An exception is thrown if an error occurred. @param text Text of updated schema definition. @param content...
[ "Update", "the", "schema", "for", "this", "session", "s", "application", "with", "the", "given", "definition", ".", "The", "text", "must", "be", "formatted", "in", "XML", "or", "JSON", "as", "defined", "by", "the", "given", "content", "type", ".", "True", ...
ad64d3c37922eefda68ec8869ef089c1ca604b70
https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-client/src/main/java/com/dell/doradus/client/ApplicationSession.java#L135-L152
train
QSFT/Doradus
doradus-client/src/main/java/com/dell/doradus/client/ApplicationSession.java
ApplicationSession.throwIfErrorResponse
protected void throwIfErrorResponse(RESTResponse response) { if (response.getCode().isError()) { String errMsg = response.getBody(); if (Utils.isEmpty(errMsg)) { errMsg = "Unknown error; response code: " + response.getCode(); } throw new Runt...
java
protected void throwIfErrorResponse(RESTResponse response) { if (response.getCode().isError()) { String errMsg = response.getBody(); if (Utils.isEmpty(errMsg)) { errMsg = "Unknown error; response code: " + response.getCode(); } throw new Runt...
[ "protected", "void", "throwIfErrorResponse", "(", "RESTResponse", "response", ")", "{", "if", "(", "response", ".", "getCode", "(", ")", ".", "isError", "(", ")", ")", "{", "String", "errMsg", "=", "response", ".", "getBody", "(", ")", ";", "if", "(", ...
If the given response shows an error, throw a RuntimeException using its text.
[ "If", "the", "given", "response", "shows", "an", "error", "throw", "a", "RuntimeException", "using", "its", "text", "." ]
ad64d3c37922eefda68ec8869ef089c1ca604b70
https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-client/src/main/java/com/dell/doradus/client/ApplicationSession.java#L265-L273
train
QSFT/Doradus
doradus-server/src/main/java/com/dell/doradus/olap/ParsedQuery.java
ParsedQuery.get
public String get(String key) { if(requestedKeys == null) requestedKeys = new HashSet<String>(); String value = map.get(key); requestedKeys.add(key); return value; }
java
public String get(String key) { if(requestedKeys == null) requestedKeys = new HashSet<String>(); String value = map.get(key); requestedKeys.add(key); return value; }
[ "public", "String", "get", "(", "String", "key", ")", "{", "if", "(", "requestedKeys", "==", "null", ")", "requestedKeys", "=", "new", "HashSet", "<", "String", ">", "(", ")", ";", "String", "value", "=", "map", ".", "get", "(", "key", ")", ";", "r...
Gets a value by the key specified. Returns null if the key does not exist.
[ "Gets", "a", "value", "by", "the", "key", "specified", ".", "Returns", "null", "if", "the", "key", "does", "not", "exist", "." ]
ad64d3c37922eefda68ec8869ef089c1ca604b70
https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-server/src/main/java/com/dell/doradus/olap/ParsedQuery.java#L80-L85
train
QSFT/Doradus
doradus-server/src/main/java/com/dell/doradus/olap/ParsedQuery.java
ParsedQuery.getString
public String getString(String key) { String value = get(key); Utils.require(value != null, key + " parameter is not set"); return value; }
java
public String getString(String key) { String value = get(key); Utils.require(value != null, key + " parameter is not set"); return value; }
[ "public", "String", "getString", "(", "String", "key", ")", "{", "String", "value", "=", "get", "(", "key", ")", ";", "Utils", ".", "require", "(", "value", "!=", "null", ",", "key", "+", "\" parameter is not set\"", ")", ";", "return", "value", ";", "...
Gets a value by the key specified. Unlike 'get', checks that the parameter is not null
[ "Gets", "a", "value", "by", "the", "key", "specified", ".", "Unlike", "get", "checks", "that", "the", "parameter", "is", "not", "null" ]
ad64d3c37922eefda68ec8869ef089c1ca604b70
https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-server/src/main/java/com/dell/doradus/olap/ParsedQuery.java#L90-L94
train
QSFT/Doradus
doradus-server/src/main/java/com/dell/doradus/olap/ParsedQuery.java
ParsedQuery.getInt
public int getInt(String key) { String value = get(key); Utils.require(value != null, key + " parameter is not set"); try { return Integer.parseInt(value); } catch (NumberFormatException e) { throw new IllegalArgumentException(key + " parameter should be a number"); ...
java
public int getInt(String key) { String value = get(key); Utils.require(value != null, key + " parameter is not set"); try { return Integer.parseInt(value); } catch (NumberFormatException e) { throw new IllegalArgumentException(key + " parameter should be a number"); ...
[ "public", "int", "getInt", "(", "String", "key", ")", "{", "String", "value", "=", "get", "(", "key", ")", ";", "Utils", ".", "require", "(", "value", "!=", "null", ",", "key", "+", "\" parameter is not set\"", ")", ";", "try", "{", "return", "Integer"...
Returns an integer value by the key specified and throws exception if it was not specified
[ "Returns", "an", "integer", "value", "by", "the", "key", "specified", "and", "throws", "exception", "if", "it", "was", "not", "specified" ]
ad64d3c37922eefda68ec8869ef089c1ca604b70
https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-server/src/main/java/com/dell/doradus/olap/ParsedQuery.java#L110-L118
train
QSFT/Doradus
doradus-server/src/main/java/com/dell/doradus/olap/ParsedQuery.java
ParsedQuery.getInt
public int getInt(String key, int defaultValue) { String value = get(key); if(value == null) return defaultValue; try { return Integer.parseInt(value); } catch (NumberFormatException e) { throw new IllegalArgumentException(key + " parameter should be a number"); }...
java
public int getInt(String key, int defaultValue) { String value = get(key); if(value == null) return defaultValue; try { return Integer.parseInt(value); } catch (NumberFormatException e) { throw new IllegalArgumentException(key + " parameter should be a number"); }...
[ "public", "int", "getInt", "(", "String", "key", ",", "int", "defaultValue", ")", "{", "String", "value", "=", "get", "(", "key", ")", ";", "if", "(", "value", "==", "null", ")", "return", "defaultValue", ";", "try", "{", "return", "Integer", ".", "p...
Returns an integer value by the key specified or defaultValue if the key was not provided
[ "Returns", "an", "integer", "value", "by", "the", "key", "specified", "or", "defaultValue", "if", "the", "key", "was", "not", "provided" ]
ad64d3c37922eefda68ec8869ef089c1ca604b70
https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-server/src/main/java/com/dell/doradus/olap/ParsedQuery.java#L123-L131
train
QSFT/Doradus
doradus-server/src/main/java/com/dell/doradus/olap/ParsedQuery.java
ParsedQuery.getBoolean
public boolean getBoolean(String key, boolean defaultValue) { String value = get(key); if(value == null) return defaultValue; return XType.getBoolean(value); }
java
public boolean getBoolean(String key, boolean defaultValue) { String value = get(key); if(value == null) return defaultValue; return XType.getBoolean(value); }
[ "public", "boolean", "getBoolean", "(", "String", "key", ",", "boolean", "defaultValue", ")", "{", "String", "value", "=", "get", "(", "key", ")", ";", "if", "(", "value", "==", "null", ")", "return", "defaultValue", ";", "return", "XType", ".", "getBool...
Returns a boolean value by the key specified or defaultValue if the key was not provided
[ "Returns", "a", "boolean", "value", "by", "the", "key", "specified", "or", "defaultValue", "if", "the", "key", "was", "not", "provided" ]
ad64d3c37922eefda68ec8869ef089c1ca604b70
https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-server/src/main/java/com/dell/doradus/olap/ParsedQuery.java#L136-L140
train
QSFT/Doradus
doradus-server/src/main/java/com/dell/doradus/olap/ParsedQuery.java
ParsedQuery.checkInvalidParameters
public void checkInvalidParameters() { for(String key: map.keySet()) { boolean wasRequested = requestedKeys != null && requestedKeys.contains(key); if(!wasRequested) throw new IllegalArgumentException("Unknown parameter " + key); } }
java
public void checkInvalidParameters() { for(String key: map.keySet()) { boolean wasRequested = requestedKeys != null && requestedKeys.contains(key); if(!wasRequested) throw new IllegalArgumentException("Unknown parameter " + key); } }
[ "public", "void", "checkInvalidParameters", "(", ")", "{", "for", "(", "String", "key", ":", "map", ".", "keySet", "(", ")", ")", "{", "boolean", "wasRequested", "=", "requestedKeys", "!=", "null", "&&", "requestedKeys", ".", "contains", "(", "key", ")", ...
Checks that there are no more parameters than those that have ever been requested. Call this after you processed all parameters you need if you want an IllegalArgumentException to be thrown if there are more parameters
[ "Checks", "that", "there", "are", "no", "more", "parameters", "than", "those", "that", "have", "ever", "been", "requested", ".", "Call", "this", "after", "you", "processed", "all", "parameters", "you", "need", "if", "you", "want", "an", "IllegalArgumentExcepti...
ad64d3c37922eefda68ec8869ef089c1ca604b70
https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-server/src/main/java/com/dell/doradus/olap/ParsedQuery.java#L148-L154
train
QSFT/Doradus
doradus-server/src/main/java/com/dell/doradus/service/db/thrift/CassandraDefs.java
CassandraDefs.keyRangeStartRow
static KeyRange keyRangeStartRow(byte[] startRowKey) { KeyRange keyRange = new KeyRange(); keyRange.setStart_key(startRowKey); keyRange.setEnd_key(EMPTY_BYTE_BUFFER); keyRange.setCount(MAX_ROWS_BATCH_SIZE); return keyRange; }
java
static KeyRange keyRangeStartRow(byte[] startRowKey) { KeyRange keyRange = new KeyRange(); keyRange.setStart_key(startRowKey); keyRange.setEnd_key(EMPTY_BYTE_BUFFER); keyRange.setCount(MAX_ROWS_BATCH_SIZE); return keyRange; }
[ "static", "KeyRange", "keyRangeStartRow", "(", "byte", "[", "]", "startRowKey", ")", "{", "KeyRange", "keyRange", "=", "new", "KeyRange", "(", ")", ";", "keyRange", ".", "setStart_key", "(", "startRowKey", ")", ";", "keyRange", ".", "setEnd_key", "(", "EMPTY...
Create a KeyRange that begins at the given row key. @param startRowKey Starting row key as a byte[]. @return KeyRange that starts at the given row, open-ended.
[ "Create", "a", "KeyRange", "that", "begins", "at", "the", "given", "row", "key", "." ]
ad64d3c37922eefda68ec8869ef089c1ca604b70
https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-server/src/main/java/com/dell/doradus/service/db/thrift/CassandraDefs.java#L115-L121
train
QSFT/Doradus
doradus-server/src/main/java/com/dell/doradus/service/db/thrift/CassandraDefs.java
CassandraDefs.keyRangeSingleRow
static KeyRange keyRangeSingleRow(byte[] rowKey) { KeyRange keyRange = new KeyRange(); keyRange.setStart_key(rowKey); keyRange.setEnd_key(rowKey); keyRange.setCount(1); return keyRange; }
java
static KeyRange keyRangeSingleRow(byte[] rowKey) { KeyRange keyRange = new KeyRange(); keyRange.setStart_key(rowKey); keyRange.setEnd_key(rowKey); keyRange.setCount(1); return keyRange; }
[ "static", "KeyRange", "keyRangeSingleRow", "(", "byte", "[", "]", "rowKey", ")", "{", "KeyRange", "keyRange", "=", "new", "KeyRange", "(", ")", ";", "keyRange", ".", "setStart_key", "(", "rowKey", ")", ";", "keyRange", ".", "setEnd_key", "(", "rowKey", ")"...
Create a KeyRange that selects a single row with the given key. @param rowKey Row key as a byte[]. @return KeyRange that starts and ends with the given key.
[ "Create", "a", "KeyRange", "that", "selects", "a", "single", "row", "with", "the", "given", "key", "." ]
ad64d3c37922eefda68ec8869ef089c1ca604b70
https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-server/src/main/java/com/dell/doradus/service/db/thrift/CassandraDefs.java#L137-L143
train
QSFT/Doradus
doradus-server/src/main/java/com/dell/doradus/service/db/thrift/CassandraDefs.java
CassandraDefs.slicePredicateColName
static SlicePredicate slicePredicateColName(byte[] colName) { SlicePredicate slicePred = new SlicePredicate(); slicePred.addToColumn_names(ByteBuffer.wrap(colName)); return slicePred; }
java
static SlicePredicate slicePredicateColName(byte[] colName) { SlicePredicate slicePred = new SlicePredicate(); slicePred.addToColumn_names(ByteBuffer.wrap(colName)); return slicePred; }
[ "static", "SlicePredicate", "slicePredicateColName", "(", "byte", "[", "]", "colName", ")", "{", "SlicePredicate", "slicePred", "=", "new", "SlicePredicate", "(", ")", ";", "slicePred", ".", "addToColumn_names", "(", "ByteBuffer", ".", "wrap", "(", "colName", ")...
Create a SlicePredicate that selects a single column. @param colName Column name as a byte[]. @return SlicePredicate that select the given column name only.
[ "Create", "a", "SlicePredicate", "that", "selects", "a", "single", "column", "." ]
ad64d3c37922eefda68ec8869ef089c1ca604b70
https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-server/src/main/java/com/dell/doradus/service/db/thrift/CassandraDefs.java#L225-L229
train
QSFT/Doradus
doradus-server/src/main/java/com/dell/doradus/service/db/thrift/CassandraDefs.java
CassandraDefs.slicePredicateColNames
static SlicePredicate slicePredicateColNames(Collection<byte[]> colNames) { SlicePredicate slicePred = new SlicePredicate(); for (byte[] colName : colNames) { slicePred.addToColumn_names(ByteBuffer.wrap(colName)); } return slicePred; }
java
static SlicePredicate slicePredicateColNames(Collection<byte[]> colNames) { SlicePredicate slicePred = new SlicePredicate(); for (byte[] colName : colNames) { slicePred.addToColumn_names(ByteBuffer.wrap(colName)); } return slicePred; }
[ "static", "SlicePredicate", "slicePredicateColNames", "(", "Collection", "<", "byte", "[", "]", ">", "colNames", ")", "{", "SlicePredicate", "slicePred", "=", "new", "SlicePredicate", "(", ")", ";", "for", "(", "byte", "[", "]", "colName", ":", "colNames", "...
Create a SlicePredicate that selects the given column names. @param colNames A collection of column names as byte[]s. @return SlicePredicate that selects the given column names only.
[ "Create", "a", "SlicePredicate", "that", "selects", "the", "given", "column", "names", "." ]
ad64d3c37922eefda68ec8869ef089c1ca604b70
https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-server/src/main/java/com/dell/doradus/service/db/thrift/CassandraDefs.java#L237-L243
train
QSFT/Doradus
doradus-server/src/main/java/com/dell/doradus/service/taskmanager/TaskRecord.java
TaskRecord.getTime
public Calendar getTime(String propName) { assert propName.endsWith("Time"); if (!m_properties.containsKey(propName)) { return null; } Calendar calendar = new GregorianCalendar(Utils.UTC_TIMEZONE); calendar.setTimeInMillis(Long.parseLong(m_properties.get(propName))); ...
java
public Calendar getTime(String propName) { assert propName.endsWith("Time"); if (!m_properties.containsKey(propName)) { return null; } Calendar calendar = new GregorianCalendar(Utils.UTC_TIMEZONE); calendar.setTimeInMillis(Long.parseLong(m_properties.get(propName))); ...
[ "public", "Calendar", "getTime", "(", "String", "propName", ")", "{", "assert", "propName", ".", "endsWith", "(", "\"Time\"", ")", ";", "if", "(", "!", "m_properties", ".", "containsKey", "(", "propName", ")", ")", "{", "return", "null", ";", "}", "Calen...
Get the value of a time property as a Calendar value. If the given property has not been set or is not a time value, null is returned. @param propName Name of a time-valued task record property to fetch. @return Time property value as a Calendar object in the UTC time zone.
[ "Get", "the", "value", "of", "a", "time", "property", "as", "a", "Calendar", "value", ".", "If", "the", "given", "property", "has", "not", "been", "set", "or", "is", "not", "a", "time", "value", "null", "is", "returned", "." ]
ad64d3c37922eefda68ec8869ef089c1ca604b70
https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-server/src/main/java/com/dell/doradus/service/taskmanager/TaskRecord.java#L124-L132
train
QSFT/Doradus
doradus-server/src/main/java/com/dell/doradus/service/taskmanager/TaskRecord.java
TaskRecord.toDoc
public UNode toDoc() { UNode rootNode = UNode.createMapNode(m_taskID, "task"); for (String name : m_properties.keySet()) { String value = m_properties.get(name); if (name.endsWith("Time")) { rootNode.addValueNode(name, formatTimestamp(value)); } else {...
java
public UNode toDoc() { UNode rootNode = UNode.createMapNode(m_taskID, "task"); for (String name : m_properties.keySet()) { String value = m_properties.get(name); if (name.endsWith("Time")) { rootNode.addValueNode(name, formatTimestamp(value)); } else {...
[ "public", "UNode", "toDoc", "(", ")", "{", "UNode", "rootNode", "=", "UNode", ".", "createMapNode", "(", "m_taskID", ",", "\"task\"", ")", ";", "for", "(", "String", "name", ":", "m_properties", ".", "keySet", "(", ")", ")", "{", "String", "value", "="...
Serialize this task record into a UNode tree. The root UNode is returned, which is a map containing one child value node for each TaskRecord property. The map's name is the task ID with a tag name of "task". Timestamp values are formatted into friendly display format. @return Root of a {@link UNode} tree.
[ "Serialize", "this", "task", "record", "into", "a", "UNode", "tree", ".", "The", "root", "UNode", "is", "returned", "which", "is", "a", "map", "containing", "one", "child", "value", "node", "for", "each", "TaskRecord", "property", ".", "The", "map", "s", ...
ad64d3c37922eefda68ec8869ef089c1ca604b70
https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-server/src/main/java/com/dell/doradus/service/taskmanager/TaskRecord.java#L183-L194
train
QSFT/Doradus
doradus-server/src/main/java/com/dell/doradus/service/Service.java
Service.waitForFullService
public final void waitForFullService() { if (!m_state.isInitialized()) { throw new RuntimeException("Service has not been initialized"); } synchronized (m_stateChangeLock) { // Loop until state >= RUNNING while (!m_state.isRunning()) { t...
java
public final void waitForFullService() { if (!m_state.isInitialized()) { throw new RuntimeException("Service has not been initialized"); } synchronized (m_stateChangeLock) { // Loop until state >= RUNNING while (!m_state.isRunning()) { t...
[ "public", "final", "void", "waitForFullService", "(", ")", "{", "if", "(", "!", "m_state", ".", "isInitialized", "(", ")", ")", "{", "throw", "new", "RuntimeException", "(", "\"Service has not been initialized\"", ")", ";", "}", "synchronized", "(", "m_stateChan...
Wait for this service to reach the running state then return. A RuntimeException is thrown if the service has not been initialized. @throws RuntimeException If this service has not been initialized.
[ "Wait", "for", "this", "service", "to", "reach", "the", "running", "state", "then", "return", ".", "A", "RuntimeException", "is", "thrown", "if", "the", "service", "has", "not", "been", "initialized", "." ]
ad64d3c37922eefda68ec8869ef089c1ca604b70
https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-server/src/main/java/com/dell/doradus/service/Service.java#L228-L245
train
QSFT/Doradus
doradus-server/src/main/java/com/dell/doradus/service/Service.java
Service.getParamString
public String getParamString(String paramName) { Object paramValue = getParam(paramName); if (paramValue == null) { return null; } return paramValue.toString(); }
java
public String getParamString(String paramName) { Object paramValue = getParam(paramName); if (paramValue == null) { return null; } return paramValue.toString(); }
[ "public", "String", "getParamString", "(", "String", "paramName", ")", "{", "Object", "paramValue", "=", "getParam", "(", "paramName", ")", ";", "if", "(", "paramValue", "==", "null", ")", "{", "return", "null", ";", "}", "return", "paramValue", ".", "toSt...
Get the value of the parameter with the given name belonging to this service as a String. If the parameter is not found, null is returned. @param paramName Name of parameter to find. @return Parameter found as a String if found, otherwise null.
[ "Get", "the", "value", "of", "the", "parameter", "with", "the", "given", "name", "belonging", "to", "this", "service", "as", "a", "String", ".", "If", "the", "parameter", "is", "not", "found", "null", "is", "returned", "." ]
ad64d3c37922eefda68ec8869ef089c1ca604b70
https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-server/src/main/java/com/dell/doradus/service/Service.java#L275-L281
train
QSFT/Doradus
doradus-server/src/main/java/com/dell/doradus/service/Service.java
Service.getParamInt
public int getParamInt(String paramName, int defaultValue) { Object paramValue = getParam(paramName); if (paramValue == null) { return defaultValue; } try { return Integer.parseInt(paramValue.toString()); } catch (Exception e) { throw n...
java
public int getParamInt(String paramName, int defaultValue) { Object paramValue = getParam(paramName); if (paramValue == null) { return defaultValue; } try { return Integer.parseInt(paramValue.toString()); } catch (Exception e) { throw n...
[ "public", "int", "getParamInt", "(", "String", "paramName", ",", "int", "defaultValue", ")", "{", "Object", "paramValue", "=", "getParam", "(", "paramName", ")", ";", "if", "(", "paramValue", "==", "null", ")", "{", "return", "defaultValue", ";", "}", "try...
Get the value of the parameter with the given name belonging to this service as an integer. If the parameter is not found, the given default value is returned. If the parameter is found but cannot be converted to an integer, an IllegalArgumentException is thrown. @param paramName Name of parameter to find. @param ...
[ "Get", "the", "value", "of", "the", "parameter", "with", "the", "given", "name", "belonging", "to", "this", "service", "as", "an", "integer", ".", "If", "the", "parameter", "is", "not", "found", "the", "given", "default", "value", "is", "returned", ".", ...
ad64d3c37922eefda68ec8869ef089c1ca604b70
https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-server/src/main/java/com/dell/doradus/service/Service.java#L293-L303
train
QSFT/Doradus
doradus-server/src/main/java/com/dell/doradus/service/Service.java
Service.getParamBoolean
public boolean getParamBoolean(String paramName) { Object paramValue = getParam(paramName); if (paramValue == null) { return false; } return Boolean.parseBoolean(paramValue.toString()); }
java
public boolean getParamBoolean(String paramName) { Object paramValue = getParam(paramName); if (paramValue == null) { return false; } return Boolean.parseBoolean(paramValue.toString()); }
[ "public", "boolean", "getParamBoolean", "(", "String", "paramName", ")", "{", "Object", "paramValue", "=", "getParam", "(", "paramName", ")", ";", "if", "(", "paramValue", "==", "null", ")", "{", "return", "false", ";", "}", "return", "Boolean", ".", "pars...
Get the value of the parameter with the given name belonging to this service as a boolean. If the parameter is not found, false is returned. @param paramName Name of parameter to find. @return Parameter value found or false if not found.
[ "Get", "the", "value", "of", "the", "parameter", "with", "the", "given", "name", "belonging", "to", "this", "service", "as", "a", "boolean", ".", "If", "the", "parameter", "is", "not", "found", "false", "is", "returned", "." ]
ad64d3c37922eefda68ec8869ef089c1ca604b70
https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-server/src/main/java/com/dell/doradus/service/Service.java#L312-L318
train
QSFT/Doradus
doradus-server/src/main/java/com/dell/doradus/service/Service.java
Service.getParamList
@SuppressWarnings("unchecked") public List<String> getParamList(String paramName) { Object paramValue = getParam(paramName); if (paramValue == null) { return null; } if (!(paramValue instanceof List)) { throw new IllegalArgumentException("Parameter '" +...
java
@SuppressWarnings("unchecked") public List<String> getParamList(String paramName) { Object paramValue = getParam(paramName); if (paramValue == null) { return null; } if (!(paramValue instanceof List)) { throw new IllegalArgumentException("Parameter '" +...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "List", "<", "String", ">", "getParamList", "(", "String", "paramName", ")", "{", "Object", "paramValue", "=", "getParam", "(", "paramName", ")", ";", "if", "(", "paramValue", "==", "null", ")", ...
Get the value of the given parameter name belonging to this service as a LIst of Strings. If no such parameter name is known, null is returned. If the parameter is defined but is not a list, an IllegalArgumentException is thrown. @param paramName Name of parameter to get value of. @return Parameter va...
[ "Get", "the", "value", "of", "the", "given", "parameter", "name", "belonging", "to", "this", "service", "as", "a", "LIst", "of", "Strings", ".", "If", "no", "such", "parameter", "name", "is", "known", "null", "is", "returned", ".", "If", "the", "paramete...
ad64d3c37922eefda68ec8869ef089c1ca604b70
https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-server/src/main/java/com/dell/doradus/service/Service.java#L343-L353
train
QSFT/Doradus
doradus-server/src/main/java/com/dell/doradus/service/Service.java
Service.getParamMap
@SuppressWarnings("unchecked") public Map<String, Object> getParamMap(String paramName) { Object paramValue = getParam(paramName); if (paramValue == null) { return null; } if (!(paramValue instanceof Map)) { throw new IllegalArgumentException("Parameter...
java
@SuppressWarnings("unchecked") public Map<String, Object> getParamMap(String paramName) { Object paramValue = getParam(paramName); if (paramValue == null) { return null; } if (!(paramValue instanceof Map)) { throw new IllegalArgumentException("Parameter...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "Map", "<", "String", ",", "Object", ">", "getParamMap", "(", "String", "paramName", ")", "{", "Object", "paramValue", "=", "getParam", "(", "paramName", ")", ";", "if", "(", "paramValue", "==", ...
Get the value of the given parameter name as a Map. If no such parameter name is known, null is returned. If the parameter is defined but is not a Map, an IllegalArgumentException is thrown. @param paramName Name of parameter to get value of. @return Parameter value as a String/Objec Map or null if un...
[ "Get", "the", "value", "of", "the", "given", "parameter", "name", "as", "a", "Map", ".", "If", "no", "such", "parameter", "name", "is", "known", "null", "is", "returned", ".", "If", "the", "parameter", "is", "defined", "but", "is", "not", "a", "Map", ...
ad64d3c37922eefda68ec8869ef089c1ca604b70
https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-server/src/main/java/com/dell/doradus/service/Service.java#L363-L373
train
QSFT/Doradus
doradus-server/src/main/java/com/dell/doradus/service/Service.java
Service.setState
private void setState(State newState) { m_logger.debug("Entering state: {}", newState.toString()); synchronized (m_stateChangeLock) { m_state = newState; m_stateChangeLock.notifyAll(); } }
java
private void setState(State newState) { m_logger.debug("Entering state: {}", newState.toString()); synchronized (m_stateChangeLock) { m_state = newState; m_stateChangeLock.notifyAll(); } }
[ "private", "void", "setState", "(", "State", "newState", ")", "{", "m_logger", ".", "debug", "(", "\"Entering state: {}\"", ",", "newState", ".", "toString", "(", ")", ")", ";", "synchronized", "(", "m_stateChangeLock", ")", "{", "m_state", "=", "newState", ...
Set the service's state and log the change. Notify all waiters of state change.
[ "Set", "the", "service", "s", "state", "and", "log", "the", "change", ".", "Notify", "all", "waiters", "of", "state", "change", "." ]
ad64d3c37922eefda68ec8869ef089c1ca604b70
https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-server/src/main/java/com/dell/doradus/service/Service.java#L434-L440
train
QSFT/Doradus
doradus-server/src/main/java/com/dell/doradus/service/rest/RESTService.java
RESTService.startService
@Override public void startService() { m_cmdRegistry.freezeCommandSet(true); displayCommandSet(); if (m_webservice != null) { try { m_webservice.start(); } catch (Exception e) { throw new RuntimeException("Failed to start WebSer...
java
@Override public void startService() { m_cmdRegistry.freezeCommandSet(true); displayCommandSet(); if (m_webservice != null) { try { m_webservice.start(); } catch (Exception e) { throw new RuntimeException("Failed to start WebSer...
[ "@", "Override", "public", "void", "startService", "(", ")", "{", "m_cmdRegistry", ".", "freezeCommandSet", "(", "true", ")", ";", "displayCommandSet", "(", ")", ";", "if", "(", "m_webservice", "!=", "null", ")", "{", "try", "{", "m_webservice", ".", "star...
Begin servicing REST requests.
[ "Begin", "servicing", "REST", "requests", "." ]
ad64d3c37922eefda68ec8869ef089c1ca604b70
https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-server/src/main/java/com/dell/doradus/service/rest/RESTService.java#L75-L86
train
QSFT/Doradus
doradus-server/src/main/java/com/dell/doradus/service/rest/RESTService.java
RESTService.stopService
@Override public void stopService() { try { if (m_webservice != null) { m_webservice.stop(); } } catch (Exception e) { m_logger.warn("WebService stop failed", e); } }
java
@Override public void stopService() { try { if (m_webservice != null) { m_webservice.stop(); } } catch (Exception e) { m_logger.warn("WebService stop failed", e); } }
[ "@", "Override", "public", "void", "stopService", "(", ")", "{", "try", "{", "if", "(", "m_webservice", "!=", "null", ")", "{", "m_webservice", ".", "stop", "(", ")", ";", "}", "}", "catch", "(", "Exception", "e", ")", "{", "m_logger", ".", "warn", ...
Shutdown the REST Service
[ "Shutdown", "the", "REST", "Service" ]
ad64d3c37922eefda68ec8869ef089c1ca604b70
https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-server/src/main/java/com/dell/doradus/service/rest/RESTService.java#L89-L98
train
QSFT/Doradus
doradus-server/src/main/java/com/dell/doradus/service/rest/RESTService.java
RESTService.loadWebServer
private WebServer loadWebServer() { WebServer webServer = null; if (!Utils.isEmpty(getParamString("webserver_class"))) { try { Class<?> serviceClass = Class.forName(getParamString("webserver_class")); Method instanceMethod = serviceClass.getMethod("instan...
java
private WebServer loadWebServer() { WebServer webServer = null; if (!Utils.isEmpty(getParamString("webserver_class"))) { try { Class<?> serviceClass = Class.forName(getParamString("webserver_class")); Method instanceMethod = serviceClass.getMethod("instan...
[ "private", "WebServer", "loadWebServer", "(", ")", "{", "WebServer", "webServer", "=", "null", ";", "if", "(", "!", "Utils", ".", "isEmpty", "(", "getParamString", "(", "\"webserver_class\"", ")", ")", ")", "{", "try", "{", "Class", "<", "?", ">", "servi...
Attempt to load the WebServer instance defined by webserver_class.
[ "Attempt", "to", "load", "the", "WebServer", "instance", "defined", "by", "webserver_class", "." ]
ad64d3c37922eefda68ec8869ef089c1ca604b70
https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-server/src/main/java/com/dell/doradus/service/rest/RESTService.java#L242-L255
train
QSFT/Doradus
doradus-server/src/main/java/com/dell/doradus/service/rest/RESTService.java
RESTService.displayCommandSet
private void displayCommandSet() { if (m_logger.isDebugEnabled()) { m_logger.debug("Registered REST Commands:"); Collection<String> commands = m_cmdRegistry.getCommands(); for (String command : commands) { m_logger.debug(command); } ...
java
private void displayCommandSet() { if (m_logger.isDebugEnabled()) { m_logger.debug("Registered REST Commands:"); Collection<String> commands = m_cmdRegistry.getCommands(); for (String command : commands) { m_logger.debug(command); } ...
[ "private", "void", "displayCommandSet", "(", ")", "{", "if", "(", "m_logger", ".", "isDebugEnabled", "(", ")", ")", "{", "m_logger", ".", "debug", "(", "\"Registered REST Commands:\"", ")", ";", "Collection", "<", "String", ">", "commands", "=", "m_cmdRegistry...
If DEBUG logging is enabled, log all REST commands in sorted order.
[ "If", "DEBUG", "logging", "is", "enabled", "log", "all", "REST", "commands", "in", "sorted", "order", "." ]
ad64d3c37922eefda68ec8869ef089c1ca604b70
https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-server/src/main/java/com/dell/doradus/service/rest/RESTService.java#L258-L266
train
QSFT/Doradus
doradus-common/src/main/java/com/dell/doradus/common/ObjectResult.java
ObjectResult.newErrorResult
public static ObjectResult newErrorResult(String errMsg, String objID) { ObjectResult result = new ObjectResult(); result.setStatus(Status.ERROR); result.setErrorMessage(errMsg); if (!Utils.isEmpty(objID)) { result.setObjectID(objID); } return result; ...
java
public static ObjectResult newErrorResult(String errMsg, String objID) { ObjectResult result = new ObjectResult(); result.setStatus(Status.ERROR); result.setErrorMessage(errMsg); if (!Utils.isEmpty(objID)) { result.setObjectID(objID); } return result; ...
[ "public", "static", "ObjectResult", "newErrorResult", "(", "String", "errMsg", ",", "String", "objID", ")", "{", "ObjectResult", "result", "=", "new", "ObjectResult", "(", ")", ";", "result", ".", "setStatus", "(", "Status", ".", "ERROR", ")", ";", "result",...
Create an ObjectResult with a status of ERROR and the given error message and optional object ID. @param errMsg Error message. @param objID Optional object ID. @return {@link ObjectResult} with an error status and message.
[ "Create", "an", "ObjectResult", "with", "a", "status", "of", "ERROR", "and", "the", "given", "error", "message", "and", "optional", "object", "ID", "." ]
ad64d3c37922eefda68ec8869ef089c1ca604b70
https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-common/src/main/java/com/dell/doradus/common/ObjectResult.java#L50-L58
train
QSFT/Doradus
doradus-common/src/main/java/com/dell/doradus/common/ObjectResult.java
ObjectResult.getErrorDetails
public Map<String, String> getErrorDetails() { // Add stacktrace and/or comment fields. Map<String, String> detailMap = new LinkedHashMap<String, String>(); if (m_resultFields.containsKey(COMMENT)) { detailMap.put(COMMENT, m_resultFields.get(COMMENT)); } if (m_r...
java
public Map<String, String> getErrorDetails() { // Add stacktrace and/or comment fields. Map<String, String> detailMap = new LinkedHashMap<String, String>(); if (m_resultFields.containsKey(COMMENT)) { detailMap.put(COMMENT, m_resultFields.get(COMMENT)); } if (m_r...
[ "public", "Map", "<", "String", ",", "String", ">", "getErrorDetails", "(", ")", "{", "// Add stacktrace and/or comment fields.\r", "Map", "<", "String", ",", "String", ">", "detailMap", "=", "new", "LinkedHashMap", "<", "String", ",", "String", ">", "(", ")",...
Get the error details for this response object, if any exists. The error details is typically a stack trace or comment message. The details are returned as a map of detail names to values. @return Map of error detail names to values, if any. If there are no details, the map will be empty (not null).
[ "Get", "the", "error", "details", "for", "this", "response", "object", "if", "any", "exists", ".", "The", "error", "details", "is", "typically", "a", "stack", "trace", "or", "comment", "message", ".", "The", "details", "are", "returned", "as", "a", "map", ...
ad64d3c37922eefda68ec8869ef089c1ca604b70
https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-common/src/main/java/com/dell/doradus/common/ObjectResult.java#L143-L153
train
QSFT/Doradus
doradus-common/src/main/java/com/dell/doradus/common/ObjectResult.java
ObjectResult.getStatus
public Status getStatus() { String status = m_resultFields.get(STATUS); if (status == null) { return Status.OK; } else { return Status.valueOf(status.toUpperCase()); } }
java
public Status getStatus() { String status = m_resultFields.get(STATUS); if (status == null) { return Status.OK; } else { return Status.valueOf(status.toUpperCase()); } }
[ "public", "Status", "getStatus", "(", ")", "{", "String", "status", "=", "m_resultFields", ".", "get", "(", "STATUS", ")", ";", "if", "(", "status", "==", "null", ")", "{", "return", "Status", ".", "OK", ";", "}", "else", "{", "return", "Status", "."...
Get the status for this object update result. If a status has not been explicitly defined, a value of OK is returned. @return Status value of this object update result.
[ "Get", "the", "status", "for", "this", "object", "update", "result", ".", "If", "a", "status", "has", "not", "been", "explicitly", "defined", "a", "value", "of", "OK", "is", "returned", "." ]
ad64d3c37922eefda68ec8869ef089c1ca604b70
https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-common/src/main/java/com/dell/doradus/common/ObjectResult.java#L170-L177
train
QSFT/Doradus
doradus-common/src/main/java/com/dell/doradus/common/ObjectResult.java
ObjectResult.toDoc
public UNode toDoc() { // Root node is called "doc". UNode result = UNode.createMapNode("doc"); // Each child of "doc" is a simple VALUE node. for (String fieldName : m_resultFields.keySet()) { // In XML, we want the element name to be "field" when the node nam...
java
public UNode toDoc() { // Root node is called "doc". UNode result = UNode.createMapNode("doc"); // Each child of "doc" is a simple VALUE node. for (String fieldName : m_resultFields.keySet()) { // In XML, we want the element name to be "field" when the node nam...
[ "public", "UNode", "toDoc", "(", ")", "{", "// Root node is called \"doc\".\r", "UNode", "result", "=", "UNode", ".", "createMapNode", "(", "\"doc\"", ")", ";", "// Each child of \"doc\" is a simple VALUE node.\r", "for", "(", "String", "fieldName", ":", "m_resultFields...
Serialize this ObjectResult into a UNode tree. The root node is called "doc". @return This object serialized into a UNode tree.
[ "Serialize", "this", "ObjectResult", "into", "a", "UNode", "tree", ".", "The", "root", "node", "is", "called", "doc", "." ]
ad64d3c37922eefda68ec8869ef089c1ca604b70
https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-common/src/main/java/com/dell/doradus/common/ObjectResult.java#L198-L212
train
QSFT/Doradus
doradus-server/src/main/java/com/dell/doradus/search/aggregate/DBEntitySequenceFactory.java
DBEntitySequenceFactory.collectUninitializedEntities
private List<DBEntity> collectUninitializedEntities(DBEntity entity, final String category, final TableDefinition tableDef, final List<String> fields, final String link, final Map<ObjectID, LinkList> cache, final Set<ObjectID> keys, final DBEntitySequenceOptions options) { DBEntityCollector collector = new...
java
private List<DBEntity> collectUninitializedEntities(DBEntity entity, final String category, final TableDefinition tableDef, final List<String> fields, final String link, final Map<ObjectID, LinkList> cache, final Set<ObjectID> keys, final DBEntitySequenceOptions options) { DBEntityCollector collector = new...
[ "private", "List", "<", "DBEntity", ">", "collectUninitializedEntities", "(", "DBEntity", "entity", ",", "final", "String", "category", ",", "final", "TableDefinition", "tableDef", ",", "final", "List", "<", "String", ">", "fields", ",", "final", "String", "link...
Collects the entities to be initialized with the initial list of links using the link list bulk fetch. Visits all the entities buffered by the iterators of the same category. @param entity next entity to be returned by the iterator (must be initialized first) @param category the iterator category that will return th...
[ "Collects", "the", "entities", "to", "be", "initialized", "with", "the", "initial", "list", "of", "links", "using", "the", "link", "list", "bulk", "fetch", ".", "Visits", "all", "the", "entities", "buffered", "by", "the", "iterators", "of", "the", "same", ...
ad64d3c37922eefda68ec8869ef089c1ca604b70
https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-server/src/main/java/com/dell/doradus/search/aggregate/DBEntitySequenceFactory.java#L315-L338
train
QSFT/Doradus
doradus-server/src/main/java/com/dell/doradus/search/aggregate/DBEntitySequenceFactory.java
DBEntitySequenceFactory.getCache
private <C, K, T> LRUCache<K, T> getCache(Map<C, LRUCache<K, T>> cacheMap, int capacity, C category) { LRUCache<K, T> cache = cacheMap.get(category); if (cache == null) { cache = new LRUCache<K, T>(capacity); cacheMap.put(category, cache); } return cache; }
java
private <C, K, T> LRUCache<K, T> getCache(Map<C, LRUCache<K, T>> cacheMap, int capacity, C category) { LRUCache<K, T> cache = cacheMap.get(category); if (cache == null) { cache = new LRUCache<K, T>(capacity); cacheMap.put(category, cache); } return cache; }
[ "private", "<", "C", ",", "K", ",", "T", ">", "LRUCache", "<", "K", ",", "T", ">", "getCache", "(", "Map", "<", "C", ",", "LRUCache", "<", "K", ",", "T", ">", ">", "cacheMap", ",", "int", "capacity", ",", "C", "category", ")", "{", "LRUCache", ...
Returns the LRU cache of the specified 'iterator', 'entity' or 'continuationlink' category. @param cacheMap either {@link #m_linkCache} or {@link #m_scalarCache} @param category 'iterator' category (for instance, 'Person.Message.Sender') in case of {@link #m_linkCache} 'entity' category (for instance, 'Person[Name,Dep...
[ "Returns", "the", "LRU", "cache", "of", "the", "specified", "iterator", "entity", "or", "continuationlink", "category", "." ]
ad64d3c37922eefda68ec8869ef089c1ca604b70
https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-server/src/main/java/com/dell/doradus/search/aggregate/DBEntitySequenceFactory.java#L382-L389
train
QSFT/Doradus
doradus-server/src/main/java/com/dell/doradus/search/aggregate/DBEntitySequenceFactory.java
DBEntitySequenceFactory.fetchScalarFields
private Map<ObjectID, Map<String, String>> fetchScalarFields(TableDefinition tableDef, Collection<ObjectID> ids, List<String> fields, String category) { timers.start(category, "Init Fields"); Map<ObjectID, Map<String, String>> map = SpiderHelper.getScalarValues(tableDef, ids, fields); long time = timers.st...
java
private Map<ObjectID, Map<String, String>> fetchScalarFields(TableDefinition tableDef, Collection<ObjectID> ids, List<String> fields, String category) { timers.start(category, "Init Fields"); Map<ObjectID, Map<String, String>> map = SpiderHelper.getScalarValues(tableDef, ids, fields); long time = timers.st...
[ "private", "Map", "<", "ObjectID", ",", "Map", "<", "String", ",", "String", ">", ">", "fetchScalarFields", "(", "TableDefinition", "tableDef", ",", "Collection", "<", "ObjectID", ">", "ids", ",", "List", "<", "String", ">", "fields", ",", "String", "categ...
Fetches the scalar field values of the specified set of entities @param tableDef entity type @param keys entity id list @param scalarFields field name list @return result of {@link #multiget_slice(List, ColumnParent, SlicePredicate)} execution
[ "Fetches", "the", "scalar", "field", "values", "of", "the", "specified", "set", "of", "entities" ]
ad64d3c37922eefda68ec8869ef089c1ca604b70
https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-server/src/main/java/com/dell/doradus/search/aggregate/DBEntitySequenceFactory.java#L421-L428
train
QSFT/Doradus
doradus-server/src/main/java/com/dell/doradus/search/aggregate/DBEntitySequenceFactory.java
DBEntitySequenceFactory.fetchLinks
List<ObjectID> fetchLinks(TableDefinition tableDef, ObjectID id, String link, ObjectID continuationLink, int count, String category) { timers.start(category+" links", "Continuation"); FieldDefinition linkField = tableDef.getFieldDef(link); List<ObjectID> list = SpiderHelper.getLinks(linkField, id, continua...
java
List<ObjectID> fetchLinks(TableDefinition tableDef, ObjectID id, String link, ObjectID continuationLink, int count, String category) { timers.start(category+" links", "Continuation"); FieldDefinition linkField = tableDef.getFieldDef(link); List<ObjectID> list = SpiderHelper.getLinks(linkField, id, continua...
[ "List", "<", "ObjectID", ">", "fetchLinks", "(", "TableDefinition", "tableDef", ",", "ObjectID", "id", ",", "String", "link", ",", "ObjectID", "continuationLink", ",", "int", "count", ",", "String", "category", ")", "{", "timers", ".", "start", "(", "categor...
Fetches the link list of the specified 'iterator' category of the specified entity @param tableDef entity type @param id entity id @param link link name @param continuationLink last fetched link or null if it is the initial fetch. @param count maximum size of the link list ...
[ "Fetches", "the", "link", "list", "of", "the", "specified", "iterator", "category", "of", "the", "specified", "entity" ]
ad64d3c37922eefda68ec8869ef089c1ca604b70
https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-server/src/main/java/com/dell/doradus/search/aggregate/DBEntitySequenceFactory.java#L450-L459
train
QSFT/Doradus
doradus-server/src/main/java/com/dell/doradus/search/aggregate/DBEntitySequenceFactory.java
DBEntitySequenceFactory.fetchLinks
private Map<ObjectID, List<ObjectID>> fetchLinks(TableDefinition tableDef, Collection<ObjectID> ids, String link, int count) { FieldDefinition linkField = tableDef.getFieldDef(link); return SpiderHelper.getLinks(linkField, ids, null, true, count); }
java
private Map<ObjectID, List<ObjectID>> fetchLinks(TableDefinition tableDef, Collection<ObjectID> ids, String link, int count) { FieldDefinition linkField = tableDef.getFieldDef(link); return SpiderHelper.getLinks(linkField, ids, null, true, count); }
[ "private", "Map", "<", "ObjectID", ",", "List", "<", "ObjectID", ">", ">", "fetchLinks", "(", "TableDefinition", "tableDef", ",", "Collection", "<", "ObjectID", ">", "ids", ",", "String", "link", ",", "int", "count", ")", "{", "FieldDefinition", "linkField",...
Fetches first N links of the specified type for every specified entity. @param tableDef entity type @param keys entity id list @param link link name @param count maximum size of the link list to be fetched for every entity @return result of {@link #multiget_slice(List, ColumnParent, SlicePredicate)}...
[ "Fetches", "first", "N", "links", "of", "the", "specified", "type", "for", "every", "specified", "entity", "." ]
ad64d3c37922eefda68ec8869ef089c1ca604b70
https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-server/src/main/java/com/dell/doradus/search/aggregate/DBEntitySequenceFactory.java#L470-L474
train
QSFT/Doradus
doradus-common/src/main/java/com/dell/doradus/common/JSONEmitter.java
JSONEmitter.addValue
public JSONEmitter addValue(String value) { checkComma(); write('"'); write(encodeString(value)); write('"'); return this; }
java
public JSONEmitter addValue(String value) { checkComma(); write('"'); write(encodeString(value)); write('"'); return this; }
[ "public", "JSONEmitter", "addValue", "(", "String", "value", ")", "{", "checkComma", "(", ")", ";", "write", "(", "'", "'", ")", ";", "write", "(", "encodeString", "(", "value", ")", ")", ";", "write", "(", "'", "'", ")", ";", "return", "this", ";"...
Add a String value. @param value String value. @return The same JSONEmitter object, which allows call chaining.
[ "Add", "a", "String", "value", "." ]
ad64d3c37922eefda68ec8869ef089c1ca604b70
https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-common/src/main/java/com/dell/doradus/common/JSONEmitter.java#L251-L257
train
QSFT/Doradus
doradus-common/src/main/java/com/dell/doradus/common/JSONEmitter.java
JSONEmitter.write
private void write(String str) { try { m_writer.write(str); } catch (IOException ex) { throw new RuntimeException(ex); } }
java
private void write(String str) { try { m_writer.write(str); } catch (IOException ex) { throw new RuntimeException(ex); } }
[ "private", "void", "write", "(", "String", "str", ")", "{", "try", "{", "m_writer", ".", "write", "(", "str", ")", ";", "}", "catch", "(", "IOException", "ex", ")", "{", "throw", "new", "RuntimeException", "(", "ex", ")", ";", "}", "}" ]
Write a string and turn any IOException caught into a RuntimeException
[ "Write", "a", "string", "and", "turn", "any", "IOException", "caught", "into", "a", "RuntimeException" ]
ad64d3c37922eefda68ec8869ef089c1ca604b70
https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-common/src/main/java/com/dell/doradus/common/JSONEmitter.java#L351-L357
train
QSFT/Doradus
doradus-server/src/main/java/com/dell/doradus/service/db/DBTransaction.java
DBTransaction.getColumnUpdatesMap
public Map<String, Map<String, List<DColumn>>> getColumnUpdatesMap() { Map<String, Map<String, List<DColumn>>> storeMap = new HashMap<>(); for(ColumnUpdate mutation: getColumnUpdates()) { String storeName = mutation.getStoreName(); String rowKey = mutation.getRowKey(); ...
java
public Map<String, Map<String, List<DColumn>>> getColumnUpdatesMap() { Map<String, Map<String, List<DColumn>>> storeMap = new HashMap<>(); for(ColumnUpdate mutation: getColumnUpdates()) { String storeName = mutation.getStoreName(); String rowKey = mutation.getRowKey(); ...
[ "public", "Map", "<", "String", ",", "Map", "<", "String", ",", "List", "<", "DColumn", ">", ">", ">", "getColumnUpdatesMap", "(", ")", "{", "Map", "<", "String", ",", "Map", "<", "String", ",", "List", "<", "DColumn", ">", ">", ">", "storeMap", "=...
Get the map of the column updates as storeName -> rowKey -> list of DColumns
[ "Get", "the", "map", "of", "the", "column", "updates", "as", "storeName", "-", ">", "rowKey", "-", ">", "list", "of", "DColumns" ]
ad64d3c37922eefda68ec8869ef089c1ca604b70
https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-server/src/main/java/com/dell/doradus/service/db/DBTransaction.java#L109-L128
train
QSFT/Doradus
doradus-server/src/main/java/com/dell/doradus/service/db/DBTransaction.java
DBTransaction.getColumnDeletesMap
public Map<String, Map<String, List<String>>> getColumnDeletesMap() { Map<String, Map<String, List<String>>> storeMap = new HashMap<>(); for(ColumnDelete mutation: getColumnDeletes()) { String storeName = mutation.getStoreName(); String rowKey = mutation.getRowKey(); ...
java
public Map<String, Map<String, List<String>>> getColumnDeletesMap() { Map<String, Map<String, List<String>>> storeMap = new HashMap<>(); for(ColumnDelete mutation: getColumnDeletes()) { String storeName = mutation.getStoreName(); String rowKey = mutation.getRowKey(); ...
[ "public", "Map", "<", "String", ",", "Map", "<", "String", ",", "List", "<", "String", ">", ">", ">", "getColumnDeletesMap", "(", ")", "{", "Map", "<", "String", ",", "Map", "<", "String", ",", "List", "<", "String", ">", ">", ">", "storeMap", "=",...
Get the map of the column deletes as storeName -> rowKey -> list of column names
[ "Get", "the", "map", "of", "the", "column", "deletes", "as", "storeName", "-", ">", "rowKey", "-", ">", "list", "of", "column", "names" ]
ad64d3c37922eefda68ec8869ef089c1ca604b70
https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-server/src/main/java/com/dell/doradus/service/db/DBTransaction.java#L133-L152
train
QSFT/Doradus
doradus-server/src/main/java/com/dell/doradus/service/db/DBTransaction.java
DBTransaction.getRowDeletesMap
public Map<String, List<String>> getRowDeletesMap() { Map<String, List<String>> storeMap = new HashMap<>(); for(RowDelete mutation: getRowDeletes()) { String storeName = mutation.getStoreName(); String rowKey = mutation.getRowKey(); List<String> rowList = storeMa...
java
public Map<String, List<String>> getRowDeletesMap() { Map<String, List<String>> storeMap = new HashMap<>(); for(RowDelete mutation: getRowDeletes()) { String storeName = mutation.getStoreName(); String rowKey = mutation.getRowKey(); List<String> rowList = storeMa...
[ "public", "Map", "<", "String", ",", "List", "<", "String", ">", ">", "getRowDeletesMap", "(", ")", "{", "Map", "<", "String", ",", "List", "<", "String", ">", ">", "storeMap", "=", "new", "HashMap", "<>", "(", ")", ";", "for", "(", "RowDelete", "m...
Get the map of the row deletes as storeName -> list of row keys
[ "Get", "the", "map", "of", "the", "row", "deletes", "as", "storeName", "-", ">", "list", "of", "row", "keys" ]
ad64d3c37922eefda68ec8869ef089c1ca604b70
https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-server/src/main/java/com/dell/doradus/service/db/DBTransaction.java#L157-L170
train
QSFT/Doradus
doradus-server/src/main/java/com/dell/doradus/service/db/DBTransaction.java
DBTransaction.addColumn
public void addColumn(String storeName, String rowKey, String columnName, byte[] columnValue) { m_columnUpdates.add(new ColumnUpdate(storeName, rowKey, columnName, columnValue)); }
java
public void addColumn(String storeName, String rowKey, String columnName, byte[] columnValue) { m_columnUpdates.add(new ColumnUpdate(storeName, rowKey, columnName, columnValue)); }
[ "public", "void", "addColumn", "(", "String", "storeName", ",", "String", "rowKey", ",", "String", "columnName", ",", "byte", "[", "]", "columnValue", ")", "{", "m_columnUpdates", ".", "add", "(", "new", "ColumnUpdate", "(", "storeName", ",", "rowKey", ",", ...
Add or set a column with the given binary value. @param storeName Name of store that owns row. @param rowKey Key of row that owns column. @param columnName Name of column. @param columnValue Column value in binary.
[ "Add", "or", "set", "a", "column", "with", "the", "given", "binary", "value", "." ]
ad64d3c37922eefda68ec8869ef089c1ca604b70
https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-server/src/main/java/com/dell/doradus/service/db/DBTransaction.java#L182-L184
train
QSFT/Doradus
doradus-server/src/main/java/com/dell/doradus/service/db/DBTransaction.java
DBTransaction.addColumn
public void addColumn(String storeName, String rowKey, String columnName, String columnValue) { addColumn(storeName, rowKey, columnName, Utils.toBytes(columnValue)); }
java
public void addColumn(String storeName, String rowKey, String columnName, String columnValue) { addColumn(storeName, rowKey, columnName, Utils.toBytes(columnValue)); }
[ "public", "void", "addColumn", "(", "String", "storeName", ",", "String", "rowKey", ",", "String", "columnName", ",", "String", "columnValue", ")", "{", "addColumn", "(", "storeName", ",", "rowKey", ",", "columnName", ",", "Utils", ".", "toBytes", "(", "colu...
Add or set a column with the given string value. The column value is converted to binary form using UTF-8. @param storeName Name of store that owns row. @param rowKey Key of row that owns column. @param columnName Name of column. @param columnValue Column value as a string.
[ "Add", "or", "set", "a", "column", "with", "the", "given", "string", "value", ".", "The", "column", "value", "is", "converted", "to", "binary", "form", "using", "UTF", "-", "8", "." ]
ad64d3c37922eefda68ec8869ef089c1ca604b70
https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-server/src/main/java/com/dell/doradus/service/db/DBTransaction.java#L206-L208
train
QSFT/Doradus
doradus-server/src/main/java/com/dell/doradus/service/db/DBTransaction.java
DBTransaction.deleteRow
public void deleteRow(String storeName, String rowKey) { m_rowDeletes.add(new RowDelete(storeName, rowKey)); }
java
public void deleteRow(String storeName, String rowKey) { m_rowDeletes.add(new RowDelete(storeName, rowKey)); }
[ "public", "void", "deleteRow", "(", "String", "storeName", ",", "String", "rowKey", ")", "{", "m_rowDeletes", ".", "add", "(", "new", "RowDelete", "(", "storeName", ",", "rowKey", ")", ")", ";", "}" ]
Add an update that will delete the row with the given row key from the given store. @param storeName Name of store from which to delete an object row. @param rowKey Row key in string form.
[ "Add", "an", "update", "that", "will", "delete", "the", "row", "with", "the", "given", "row", "key", "from", "the", "given", "store", "." ]
ad64d3c37922eefda68ec8869ef089c1ca604b70
https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-server/src/main/java/com/dell/doradus/service/db/DBTransaction.java#L230-L232
train
QSFT/Doradus
doradus-server/src/main/java/com/dell/doradus/service/db/DBTransaction.java
DBTransaction.traceMutations
public void traceMutations(Logger logger) { logger.debug("Transaction in " + getTenant().getName() + ": " + getMutationsCount() + " mutations"); for(ColumnUpdate mutation: getColumnUpdates()) { logger.trace(mutation.toString()); } //2. delete columns for(ColumnD...
java
public void traceMutations(Logger logger) { logger.debug("Transaction in " + getTenant().getName() + ": " + getMutationsCount() + " mutations"); for(ColumnUpdate mutation: getColumnUpdates()) { logger.trace(mutation.toString()); } //2. delete columns for(ColumnD...
[ "public", "void", "traceMutations", "(", "Logger", "logger", ")", "{", "logger", ".", "debug", "(", "\"Transaction in \"", "+", "getTenant", "(", ")", ".", "getName", "(", ")", "+", "\": \"", "+", "getMutationsCount", "(", ")", "+", "\" mutations\"", ")", ...
For extreme logging. @param logger Logger to trace mutations to.
[ "For", "extreme", "logging", "." ]
ad64d3c37922eefda68ec8869ef089c1ca604b70
https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-server/src/main/java/com/dell/doradus/service/db/DBTransaction.java#L268-L281
train
QSFT/Doradus
doradus-server/src/examples/java/com/dell/doradus/service/olap/mono/OLAPMonoService.java
OLAPMonoService.addBatch
public BatchResult addBatch(ApplicationDefinition appDef, String shardName, OlapBatch batch) { Utils.require(shardName.equals(MONO_SHARD_NAME), "Shard name must be: " + MONO_SHARD_NAME); return OLAPService.instance().addBatch(appDef, shardName, batch); }
java
public BatchResult addBatch(ApplicationDefinition appDef, String shardName, OlapBatch batch) { Utils.require(shardName.equals(MONO_SHARD_NAME), "Shard name must be: " + MONO_SHARD_NAME); return OLAPService.instance().addBatch(appDef, shardName, batch); }
[ "public", "BatchResult", "addBatch", "(", "ApplicationDefinition", "appDef", ",", "String", "shardName", ",", "OlapBatch", "batch", ")", "{", "Utils", ".", "require", "(", "shardName", ".", "equals", "(", "MONO_SHARD_NAME", ")", ",", "\"Shard name must be: \"", "+...
Store name should always be MONO_SHARD_NAME for OLAPMono.
[ "Store", "name", "should", "always", "be", "MONO_SHARD_NAME", "for", "OLAPMono", "." ]
ad64d3c37922eefda68ec8869ef089c1ca604b70
https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-server/src/examples/java/com/dell/doradus/service/olap/mono/OLAPMonoService.java#L139-L142
train
QSFT/Doradus
doradus-common/src/main/java/com/dell/doradus/common/AggregateResult.java
AggregateResult.toDoc
public UNode toDoc() { // Root "results" node. UNode resultsNode = UNode.createMapNode("results"); // "aggregate" node. UNode aggNode = resultsNode.addMapNode("aggregate"); aggNode.addValueNode("metric", m_metricParam, true); if (m_queryParam != null){ ...
java
public UNode toDoc() { // Root "results" node. UNode resultsNode = UNode.createMapNode("results"); // "aggregate" node. UNode aggNode = resultsNode.addMapNode("aggregate"); aggNode.addValueNode("metric", m_metricParam, true); if (m_queryParam != null){ ...
[ "public", "UNode", "toDoc", "(", ")", "{", "// Root \"results\" node.\r", "UNode", "resultsNode", "=", "UNode", ".", "createMapNode", "(", "\"results\"", ")", ";", "// \"aggregate\" node.\r", "UNode", "aggNode", "=", "resultsNode", ".", "addMapNode", "(", "\"aggrega...
Serialize this AggregateResult object into a UNode tree and return the root node. The root node is "results". @return Root node of a UNode tree representing this AggregateResult object.
[ "Serialize", "this", "AggregateResult", "object", "into", "a", "UNode", "tree", "and", "return", "the", "root", "node", ".", "The", "root", "node", "is", "results", "." ]
ad64d3c37922eefda68ec8869ef089c1ca604b70
https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-common/src/main/java/com/dell/doradus/common/AggregateResult.java#L714-L758
train
QSFT/Doradus
doradus-server/src/main/java/com/dell/doradus/core/IDGenerator.java
IDGenerator.nextID
public static byte[] nextID() { byte[] ID = new byte[15]; synchronized (LOCK) { long timestamp = System.currentTimeMillis(); if (timestamp != LAST_TIMESTAMP) { LAST_TIMESTAMP = timestamp; LAST_SEQUENCE = 0; TIMESTAMP_BUFFER[0...
java
public static byte[] nextID() { byte[] ID = new byte[15]; synchronized (LOCK) { long timestamp = System.currentTimeMillis(); if (timestamp != LAST_TIMESTAMP) { LAST_TIMESTAMP = timestamp; LAST_SEQUENCE = 0; TIMESTAMP_BUFFER[0...
[ "public", "static", "byte", "[", "]", "nextID", "(", ")", "{", "byte", "[", "]", "ID", "=", "new", "byte", "[", "15", "]", ";", "synchronized", "(", "LOCK", ")", "{", "long", "timestamp", "=", "System", ".", "currentTimeMillis", "(", ")", ";", "if"...
Return the next unique ID. See the class description for the format of an ID. @return The next unique ID as a byte[15]. A new byte[] is allocated with each call so the caller can modify it.
[ "Return", "the", "next", "unique", "ID", ".", "See", "the", "class", "description", "for", "the", "format", "of", "an", "ID", "." ]
ad64d3c37922eefda68ec8869ef089c1ca604b70
https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-server/src/main/java/com/dell/doradus/core/IDGenerator.java#L78-L101
train
QSFT/Doradus
doradus-server/src/main/java/com/dell/doradus/core/IDGenerator.java
IDGenerator.chooseMACAddress
private static byte[] chooseMACAddress() { byte[] result = new byte[6]; boolean bFound = false; try { Enumeration<NetworkInterface> ifaces = NetworkInterface.getNetworkInterfaces(); while (!bFound && ifaces.hasMoreElements()) { // Look for a real NIC...
java
private static byte[] chooseMACAddress() { byte[] result = new byte[6]; boolean bFound = false; try { Enumeration<NetworkInterface> ifaces = NetworkInterface.getNetworkInterfaces(); while (!bFound && ifaces.hasMoreElements()) { // Look for a real NIC...
[ "private", "static", "byte", "[", "]", "chooseMACAddress", "(", ")", "{", "byte", "[", "]", "result", "=", "new", "byte", "[", "6", "]", ";", "boolean", "bFound", "=", "false", ";", "try", "{", "Enumeration", "<", "NetworkInterface", ">", "ifaces", "="...
Choose a MAC address from one of this machine's NICs or a random value.
[ "Choose", "a", "MAC", "address", "from", "one", "of", "this", "machine", "s", "NICs", "or", "a", "random", "value", "." ]
ad64d3c37922eefda68ec8869ef089c1ca604b70
https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-server/src/main/java/com/dell/doradus/core/IDGenerator.java#L104-L132
train
QSFT/Doradus
doradus-server/src/main/java/com/dell/doradus/search/util/HeapList.java
HeapList.Add
public boolean Add(T value) { if (m_Count < m_Capacity) { m_Array[++m_Count] = value; UpHeap(); } else if (greaterThan(m_Array[1], value)) { m_Array[1] = value; DownHeap(); } else return false; return true; }
java
public boolean Add(T value) { if (m_Count < m_Capacity) { m_Array[++m_Count] = value; UpHeap(); } else if (greaterThan(m_Array[1], value)) { m_Array[1] = value; DownHeap(); } else return false; return true; }
[ "public", "boolean", "Add", "(", "T", "value", ")", "{", "if", "(", "m_Count", "<", "m_Capacity", ")", "{", "m_Array", "[", "++", "m_Count", "]", "=", "value", ";", "UpHeap", "(", ")", ";", "}", "else", "if", "(", "greaterThan", "(", "m_Array", "["...
returns true if the value has been added
[ "returns", "true", "if", "the", "value", "has", "been", "added" ]
ad64d3c37922eefda68ec8869ef089c1ca604b70
https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-server/src/main/java/com/dell/doradus/search/util/HeapList.java#L79-L90
train
QSFT/Doradus
doradus-server/src/main/java/com/dell/doradus/olap/CheckDatabase.java
CheckDatabase.checkShard
public static void checkShard(Olap olap, ApplicationDefinition appDef, String shard) { VDirectory appDir = olap.getRoot(appDef); VDirectory shardDir = appDir.getDirectory(shard); checkShard(shardDir); }
java
public static void checkShard(Olap olap, ApplicationDefinition appDef, String shard) { VDirectory appDir = olap.getRoot(appDef); VDirectory shardDir = appDir.getDirectory(shard); checkShard(shardDir); }
[ "public", "static", "void", "checkShard", "(", "Olap", "olap", ",", "ApplicationDefinition", "appDef", ",", "String", "shard", ")", "{", "VDirectory", "appDir", "=", "olap", ".", "getRoot", "(", "appDef", ")", ";", "VDirectory", "shardDir", "=", "appDir", "....
check that all segments in the shard are valid
[ "check", "that", "all", "segments", "in", "the", "shard", "are", "valid" ]
ad64d3c37922eefda68ec8869ef089c1ca604b70
https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-server/src/main/java/com/dell/doradus/olap/CheckDatabase.java#L43-L47
train
QSFT/Doradus
doradus-server/src/main/java/com/dell/doradus/olap/CheckDatabase.java
CheckDatabase.deleteSegment
public static void deleteSegment(Olap olap, ApplicationDefinition appDef, String shard, String segment) { VDirectory appDir = olap.getRoot(appDef); VDirectory shardDir = appDir.getDirectory(shard); VDirectory segmentDir = shardDir.getDirectory(segment); segmentDir.delete(); }
java
public static void deleteSegment(Olap olap, ApplicationDefinition appDef, String shard, String segment) { VDirectory appDir = olap.getRoot(appDef); VDirectory shardDir = appDir.getDirectory(shard); VDirectory segmentDir = shardDir.getDirectory(segment); segmentDir.delete(); }
[ "public", "static", "void", "deleteSegment", "(", "Olap", "olap", ",", "ApplicationDefinition", "appDef", ",", "String", "shard", ",", "String", "segment", ")", "{", "VDirectory", "appDir", "=", "olap", ".", "getRoot", "(", "appDef", ")", ";", "VDirectory", ...
delete a particular segment in the shard.
[ "delete", "a", "particular", "segment", "in", "the", "shard", "." ]
ad64d3c37922eefda68ec8869ef089c1ca604b70
https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-server/src/main/java/com/dell/doradus/olap/CheckDatabase.java#L52-L57
train
QSFT/Doradus
doradus-server/src/main/java/com/dell/doradus/service/rest/RESTRegistry.java
RESTRegistry.getCommands
public Collection<String> getCommands() { List<String> commands = new ArrayList<String>(); for (String cmdOwner : m_cmdsByOwnerMap.keySet()) { SortedMap<String, RESTCommand> ownerCmdMap = m_cmdsByOwnerMap.get(cmdOwner); for (String name : ownerCmdMap.keySet()) { ...
java
public Collection<String> getCommands() { List<String> commands = new ArrayList<String>(); for (String cmdOwner : m_cmdsByOwnerMap.keySet()) { SortedMap<String, RESTCommand> ownerCmdMap = m_cmdsByOwnerMap.get(cmdOwner); for (String name : ownerCmdMap.keySet()) { ...
[ "public", "Collection", "<", "String", ">", "getCommands", "(", ")", "{", "List", "<", "String", ">", "commands", "=", "new", "ArrayList", "<", "String", ">", "(", ")", ";", "for", "(", "String", "cmdOwner", ":", "m_cmdsByOwnerMap", ".", "keySet", "(", ...
Get all REST commands as a list of strings for debugging purposes. @return List of commands for debugging.
[ "Get", "all", "REST", "commands", "as", "a", "list", "of", "strings", "for", "debugging", "purposes", "." ]
ad64d3c37922eefda68ec8869ef089c1ca604b70
https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-server/src/main/java/com/dell/doradus/service/rest/RESTRegistry.java#L205-L215
train
QSFT/Doradus
doradus-server/src/main/java/com/dell/doradus/service/rest/RESTRegistry.java
RESTRegistry.registerCommand
private void registerCommand(String cmdOwner, RegisteredCommand cmd) { // Add to owner map in RESTCatalog. Map<String, RESTCommand> nameMap = getCmdNameMap(cmdOwner); String cmdName = cmd.getName(); RESTCommand oldCmd = nameMap.put(cmdName, cmd); if (oldCmd != null) { ...
java
private void registerCommand(String cmdOwner, RegisteredCommand cmd) { // Add to owner map in RESTCatalog. Map<String, RESTCommand> nameMap = getCmdNameMap(cmdOwner); String cmdName = cmd.getName(); RESTCommand oldCmd = nameMap.put(cmdName, cmd); if (oldCmd != null) { ...
[ "private", "void", "registerCommand", "(", "String", "cmdOwner", ",", "RegisteredCommand", "cmd", ")", "{", "// Add to owner map in RESTCatalog.\r", "Map", "<", "String", ",", "RESTCommand", ">", "nameMap", "=", "getCmdNameMap", "(", "cmdOwner", ")", ";", "String", ...
Register the given command and throw if is a duplicate name or command.
[ "Register", "the", "given", "command", "and", "throw", "if", "is", "a", "duplicate", "name", "or", "command", "." ]
ad64d3c37922eefda68ec8869ef089c1ca604b70
https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-server/src/main/java/com/dell/doradus/service/rest/RESTRegistry.java#L220-L245
train
QSFT/Doradus
doradus-server/src/main/java/com/dell/doradus/service/rest/RESTRegistry.java
RESTRegistry.getCmdNameMap
private Map<String, RESTCommand> getCmdNameMap(String cmdOwner) { SortedMap<String, RESTCommand> cmdNameMap = m_cmdsByOwnerMap.get(cmdOwner); if (cmdNameMap == null) { cmdNameMap = new TreeMap<>(); m_cmdsByOwnerMap.put(cmdOwner, cmdNameMap); } return cmdName...
java
private Map<String, RESTCommand> getCmdNameMap(String cmdOwner) { SortedMap<String, RESTCommand> cmdNameMap = m_cmdsByOwnerMap.get(cmdOwner); if (cmdNameMap == null) { cmdNameMap = new TreeMap<>(); m_cmdsByOwnerMap.put(cmdOwner, cmdNameMap); } return cmdName...
[ "private", "Map", "<", "String", ",", "RESTCommand", ">", "getCmdNameMap", "(", "String", "cmdOwner", ")", "{", "SortedMap", "<", "String", ",", "RESTCommand", ">", "cmdNameMap", "=", "m_cmdsByOwnerMap", ".", "get", "(", "cmdOwner", ")", ";", "if", "(", "c...
Get the method -> command map for the given owner.
[ "Get", "the", "method", "-", ">", "command", "map", "for", "the", "given", "owner", "." ]
ad64d3c37922eefda68ec8869ef089c1ca604b70
https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-server/src/main/java/com/dell/doradus/service/rest/RESTRegistry.java#L248-L255
train
QSFT/Doradus
doradus-server/src/main/java/com/dell/doradus/service/rest/RESTRegistry.java
RESTRegistry.getCmdEvalMap
private Map<HttpMethod, SortedSet<RegisteredCommand>> getCmdEvalMap(String cmdOwner) { Map<HttpMethod, SortedSet<RegisteredCommand>> evalMap = m_cmdEvalMap.get(cmdOwner); if (evalMap == null) { evalMap = new HashMap<>(); m_cmdEvalMap.put(cmdOwner, evalMap); } ...
java
private Map<HttpMethod, SortedSet<RegisteredCommand>> getCmdEvalMap(String cmdOwner) { Map<HttpMethod, SortedSet<RegisteredCommand>> evalMap = m_cmdEvalMap.get(cmdOwner); if (evalMap == null) { evalMap = new HashMap<>(); m_cmdEvalMap.put(cmdOwner, evalMap); } ...
[ "private", "Map", "<", "HttpMethod", ",", "SortedSet", "<", "RegisteredCommand", ">", ">", "getCmdEvalMap", "(", "String", "cmdOwner", ")", "{", "Map", "<", "HttpMethod", ",", "SortedSet", "<", "RegisteredCommand", ">", ">", "evalMap", "=", "m_cmdEvalMap", "."...
Get the method -> sorted command map for the given owner.
[ "Get", "the", "method", "-", ">", "sorted", "command", "map", "for", "the", "given", "owner", "." ]
ad64d3c37922eefda68ec8869ef089c1ca604b70
https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-server/src/main/java/com/dell/doradus/service/rest/RESTRegistry.java#L258-L265
train
QSFT/Doradus
doradus-server/src/main/java/com/dell/doradus/service/rest/RESTRegistry.java
RESTRegistry.searchCommands
private RegisteredCommand searchCommands(String cmdOwner, HttpMethod method, String uri, String query, Map<String, String> variableMap) { Map<HttpMethod, SortedSet<RegisteredCommand>> evalMap = getCmdEvalMap(cmdOwner); if (evalMap == null) { r...
java
private RegisteredCommand searchCommands(String cmdOwner, HttpMethod method, String uri, String query, Map<String, String> variableMap) { Map<HttpMethod, SortedSet<RegisteredCommand>> evalMap = getCmdEvalMap(cmdOwner); if (evalMap == null) { r...
[ "private", "RegisteredCommand", "searchCommands", "(", "String", "cmdOwner", ",", "HttpMethod", "method", ",", "String", "uri", ",", "String", "query", ",", "Map", "<", "String", ",", "String", ">", "variableMap", ")", "{", "Map", "<", "HttpMethod", ",", "So...
Search the given command owner for a matching command.
[ "Search", "the", "given", "command", "owner", "for", "a", "matching", "command", "." ]
ad64d3c37922eefda68ec8869ef089c1ca604b70
https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-server/src/main/java/com/dell/doradus/service/rest/RESTRegistry.java#L268-L297
train
QSFT/Doradus
doradus-client/src/main/java/com/dell/doradus/client/Client.java
Client.deleteApplication
public boolean deleteApplication(String appName, String key) { Utils.require(!m_restClient.isClosed(), "Client has been closed"); Utils.require(appName != null && appName.length() > 0, "appName"); try { // Send a DELETE request to "/_applications/{application}/{key}". ...
java
public boolean deleteApplication(String appName, String key) { Utils.require(!m_restClient.isClosed(), "Client has been closed"); Utils.require(appName != null && appName.length() > 0, "appName"); try { // Send a DELETE request to "/_applications/{application}/{key}". ...
[ "public", "boolean", "deleteApplication", "(", "String", "appName", ",", "String", "key", ")", "{", "Utils", ".", "require", "(", "!", "m_restClient", ".", "isClosed", "(", ")", ",", "\"Client has been closed\"", ")", ";", "Utils", ".", "require", "(", "appN...
Delete an existing application from the current Doradus tenant, including all of its tables and data. Because updates are idempotent, deleting an already-deleted application is acceptable. Hence, if no error is thrown, the result is always true. An exception is thrown if an error occurs. @param appName Name of exist...
[ "Delete", "an", "existing", "application", "from", "the", "current", "Doradus", "tenant", "including", "all", "of", "its", "tables", "and", "data", ".", "Because", "updates", "are", "idempotent", "deleting", "an", "already", "-", "deleted", "application", "is", ...
ad64d3c37922eefda68ec8869ef089c1ca604b70
https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-client/src/main/java/com/dell/doradus/client/Client.java#L403-L426
train
QSFT/Doradus
doradus-client/src/main/java/com/dell/doradus/client/Client.java
Client.openApplication
private static ApplicationSession openApplication(ApplicationDefinition appDef, RESTClient restClient) { String storageService = appDef.getStorageService(); if (storageService == null || storageService.length() <= "Service".length() || !storageService.endsWith("Servic...
java
private static ApplicationSession openApplication(ApplicationDefinition appDef, RESTClient restClient) { String storageService = appDef.getStorageService(); if (storageService == null || storageService.length() <= "Service".length() || !storageService.endsWith("Servic...
[ "private", "static", "ApplicationSession", "openApplication", "(", "ApplicationDefinition", "appDef", ",", "RESTClient", "restClient", ")", "{", "String", "storageService", "=", "appDef", ".", "getStorageService", "(", ")", ";", "if", "(", "storageService", "==", "n...
the given restClient. If the open fails, the restClient is closed.
[ "the", "given", "restClient", ".", "If", "the", "open", "fails", "the", "restClient", "is", "closed", "." ]
ad64d3c37922eefda68ec8869ef089c1ca604b70
https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-client/src/main/java/com/dell/doradus/client/Client.java#L432-L454
train
QSFT/Doradus
doradus-common/src/main/java/com/dell/doradus/management/MBeanProxyFactory.java
MBeanProxyFactory.createServerMonitorProxy
public ServerMonitorMXBean createServerMonitorProxy() throws IOException { String beanName = ServerMonitorMXBean.JMX_DOMAIN_NAME + ":type=" + ServerMonitorMXBean.JMX_TYPE_NAME; return createMXBeanProxy(beanName, ServerMonitorMXBean.class); }
java
public ServerMonitorMXBean createServerMonitorProxy() throws IOException { String beanName = ServerMonitorMXBean.JMX_DOMAIN_NAME + ":type=" + ServerMonitorMXBean.JMX_TYPE_NAME; return createMXBeanProxy(beanName, ServerMonitorMXBean.class); }
[ "public", "ServerMonitorMXBean", "createServerMonitorProxy", "(", ")", "throws", "IOException", "{", "String", "beanName", "=", "ServerMonitorMXBean", ".", "JMX_DOMAIN_NAME", "+", "\":type=\"", "+", "ServerMonitorMXBean", ".", "JMX_TYPE_NAME", ";", "return", "createMXBean...
Makes the proxy for ServerMonitorMXBean. @return A ServerMonitorMXBean proxy object. @throws IOException
[ "Makes", "the", "proxy", "for", "ServerMonitorMXBean", "." ]
ad64d3c37922eefda68ec8869ef089c1ca604b70
https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-common/src/main/java/com/dell/doradus/management/MBeanProxyFactory.java#L79-L82
train
QSFT/Doradus
doradus-common/src/main/java/com/dell/doradus/management/MBeanProxyFactory.java
MBeanProxyFactory.createStorageManagerProxy
public StorageManagerMXBean createStorageManagerProxy() throws IOException { String beanName = StorageManagerMXBean.JMX_DOMAIN_NAME + ":type=" + StorageManagerMXBean.JMX_TYPE_NAME; return createMXBeanProxy(beanName, StorageManagerMXBean.class); }
java
public StorageManagerMXBean createStorageManagerProxy() throws IOException { String beanName = StorageManagerMXBean.JMX_DOMAIN_NAME + ":type=" + StorageManagerMXBean.JMX_TYPE_NAME; return createMXBeanProxy(beanName, StorageManagerMXBean.class); }
[ "public", "StorageManagerMXBean", "createStorageManagerProxy", "(", ")", "throws", "IOException", "{", "String", "beanName", "=", "StorageManagerMXBean", ".", "JMX_DOMAIN_NAME", "+", "\":type=\"", "+", "StorageManagerMXBean", ".", "JMX_TYPE_NAME", ";", "return", "createMX...
Makes the proxy for StorageManagerMXBean. @return A StorageManagerMXBean object. @throws IOException
[ "Makes", "the", "proxy", "for", "StorageManagerMXBean", "." ]
ad64d3c37922eefda68ec8869ef089c1ca604b70
https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-common/src/main/java/com/dell/doradus/management/MBeanProxyFactory.java#L89-L92
train
QSFT/Doradus
doradus-server/src/main/java/com/dell/doradus/mbeans/StorageManager.java
StorageManager.getOperationMode
@Override public String getOperationMode() { String mode = getNode().getOperationMode(); if(mode != null && NORMAL.equals(mode.toUpperCase())) { mode = NORMAL; } return mode; }
java
@Override public String getOperationMode() { String mode = getNode().getOperationMode(); if(mode != null && NORMAL.equals(mode.toUpperCase())) { mode = NORMAL; } return mode; }
[ "@", "Override", "public", "String", "getOperationMode", "(", ")", "{", "String", "mode", "=", "getNode", "(", ")", ".", "getOperationMode", "(", ")", ";", "if", "(", "mode", "!=", "null", "&&", "NORMAL", ".", "equals", "(", "mode", ".", "toUpperCase", ...
The operation mode of the Cassandra node. @return one of: NORMAL, CLIENT, JOINING, LEAVING, DECOMMISSIONED, MOVING, DRAINING, or DRAINED.
[ "The", "operation", "mode", "of", "the", "Cassandra", "node", "." ]
ad64d3c37922eefda68ec8869ef089c1ca604b70
https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-server/src/main/java/com/dell/doradus/mbeans/StorageManager.java#L90-L97
train
QSFT/Doradus
doradus-server/src/main/java/com/dell/doradus/search/aggregate/Aggregate.java
Aggregate.collectGroupValues
private void collectGroupValues(Entity obj, PathEntry entry, GroupSetEntry groupSetEntry, Set<String>[] groupKeys) { if(entry.query != null) { timers.start("Where", entry.queryText); boolean result = entry.checkCondition(obj); timers.stop("Where", entry.queryText, result ? 1 : 0); if (!result) return...
java
private void collectGroupValues(Entity obj, PathEntry entry, GroupSetEntry groupSetEntry, Set<String>[] groupKeys) { if(entry.query != null) { timers.start("Where", entry.queryText); boolean result = entry.checkCondition(obj); timers.stop("Where", entry.queryText, result ? 1 : 0); if (!result) return...
[ "private", "void", "collectGroupValues", "(", "Entity", "obj", ",", "PathEntry", "entry", ",", "GroupSetEntry", "groupSetEntry", ",", "Set", "<", "String", ">", "[", "]", "groupKeys", ")", "{", "if", "(", "entry", ".", "query", "!=", "null", ")", "{", "t...
Collect all values from all object found in the path subtree
[ "Collect", "all", "values", "from", "all", "object", "found", "in", "the", "path", "subtree" ]
ad64d3c37922eefda68ec8869ef089c1ca604b70
https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-server/src/main/java/com/dell/doradus/search/aggregate/Aggregate.java#L333-L379
train
QSFT/Doradus
doradus-server/src/main/java/com/dell/doradus/search/aggregate/Aggregate.java
Aggregate.updateMetric
private void updateMetric(String value, GroupSetEntry groupSetEntry, Set<String>[] groupKeys){ updateMetric(value, groupSetEntry.m_totalGroup, groupKeys, 0); if (groupSetEntry.m_isComposite){ updateMetric(value, groupSetEntry.m_compositeGroup, groupKeys, groupKeys.length - 1); } }
java
private void updateMetric(String value, GroupSetEntry groupSetEntry, Set<String>[] groupKeys){ updateMetric(value, groupSetEntry.m_totalGroup, groupKeys, 0); if (groupSetEntry.m_isComposite){ updateMetric(value, groupSetEntry.m_compositeGroup, groupKeys, groupKeys.length - 1); } }
[ "private", "void", "updateMetric", "(", "String", "value", ",", "GroupSetEntry", "groupSetEntry", ",", "Set", "<", "String", ">", "[", "]", "groupKeys", ")", "{", "updateMetric", "(", "value", ",", "groupSetEntry", ".", "m_totalGroup", ",", "groupKeys", ",", ...
add value to the aggregation groups
[ "add", "value", "to", "the", "aggregation", "groups" ]
ad64d3c37922eefda68ec8869ef089c1ca604b70
https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-server/src/main/java/com/dell/doradus/search/aggregate/Aggregate.java#L393-L398
train
QSFT/Doradus
doradus-server/src/main/java/com/dell/doradus/search/aggregate/Aggregate.java
Aggregate.updateMetric
private synchronized void updateMetric(String value, Group group, Set<String>[] groupKeys, int index){ group.update(value); if (index < groupKeys.length){ for (String key : groupKeys[index]){ Group subgroup = group.subgroup(key); updateMetric(value, subgroup, groupKeys, index + 1); } } }
java
private synchronized void updateMetric(String value, Group group, Set<String>[] groupKeys, int index){ group.update(value); if (index < groupKeys.length){ for (String key : groupKeys[index]){ Group subgroup = group.subgroup(key); updateMetric(value, subgroup, groupKeys, index + 1); } } }
[ "private", "synchronized", "void", "updateMetric", "(", "String", "value", ",", "Group", "group", ",", "Set", "<", "String", ">", "[", "]", "groupKeys", ",", "int", "index", ")", "{", "group", ".", "update", "(", "value", ")", ";", "if", "(", "index", ...
add value to the aggregation group and all subgroups in accordance with the groupKeys paths.
[ "add", "value", "to", "the", "aggregation", "group", "and", "all", "subgroups", "in", "accordance", "with", "the", "groupKeys", "paths", "." ]
ad64d3c37922eefda68ec8869ef089c1ca604b70
https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-server/src/main/java/com/dell/doradus/search/aggregate/Aggregate.java#L401-L409
train
QSFT/Doradus
doradus-common/src/main/java/com/dell/doradus/common/RetentionAge.java
RetentionAge.getExpiredDate
public GregorianCalendar getExpiredDate(GregorianCalendar relativeDate) { // Get today's date and adjust by the specified age. GregorianCalendar expiredDate = (GregorianCalendar)relativeDate.clone(); switch (m_units) { case DAYS: expiredDate.add(Calendar.DAY_OF_MONTH, -m...
java
public GregorianCalendar getExpiredDate(GregorianCalendar relativeDate) { // Get today's date and adjust by the specified age. GregorianCalendar expiredDate = (GregorianCalendar)relativeDate.clone(); switch (m_units) { case DAYS: expiredDate.add(Calendar.DAY_OF_MONTH, -m...
[ "public", "GregorianCalendar", "getExpiredDate", "(", "GregorianCalendar", "relativeDate", ")", "{", "// Get today's date and adjust by the specified age.\r", "GregorianCalendar", "expiredDate", "=", "(", "GregorianCalendar", ")", "relativeDate", ".", "clone", "(", ")", ";", ...
Find the date on or before which objects expire based on the given date and the retention age specified in this object. The given date is cloned and then adjusted downward by the units and value in this RetentionAge. @param relativeDate Reference date. @return The date relative to the given one at which objects ...
[ "Find", "the", "date", "on", "or", "before", "which", "objects", "expire", "based", "on", "the", "given", "date", "and", "the", "retention", "age", "specified", "in", "this", "object", ".", "The", "given", "date", "is", "cloned", "and", "then", "adjusted",...
ad64d3c37922eefda68ec8869ef089c1ca604b70
https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-common/src/main/java/com/dell/doradus/common/RetentionAge.java#L99-L117
train
QSFT/Doradus
doradus-server/src/main/java/com/dell/doradus/service/db/cql/CQLStatementCache.java
CQLStatementCache.getPreparedQuery
public PreparedStatement getPreparedQuery(String tableName, Query query) { synchronized (m_prepQueryMap) { Map<Query, PreparedStatement> statementMap = m_prepQueryMap.get(tableName); if (statementMap == null) { statementMap = new HashMap<>(); m_prepQueryMa...
java
public PreparedStatement getPreparedQuery(String tableName, Query query) { synchronized (m_prepQueryMap) { Map<Query, PreparedStatement> statementMap = m_prepQueryMap.get(tableName); if (statementMap == null) { statementMap = new HashMap<>(); m_prepQueryMa...
[ "public", "PreparedStatement", "getPreparedQuery", "(", "String", "tableName", ",", "Query", "query", ")", "{", "synchronized", "(", "m_prepQueryMap", ")", "{", "Map", "<", "Query", ",", "PreparedStatement", ">", "statementMap", "=", "m_prepQueryMap", ".", "get", ...
Get the given prepared statement for the given table and query. Upon first invocation for a given combo, the query is parsed and cached. @param tableName Name of table to customize query for. @param query Inquiry {@link Query}. @return PreparedStatement for given combo.
[ "Get", "the", "given", "prepared", "statement", "for", "the", "given", "table", "and", "query", ".", "Upon", "first", "invocation", "for", "a", "given", "combo", "the", "query", "is", "parsed", "and", "cached", "." ]
ad64d3c37922eefda68ec8869ef089c1ca604b70
https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-server/src/main/java/com/dell/doradus/service/db/cql/CQLStatementCache.java#L91-L105
train
QSFT/Doradus
doradus-server/src/main/java/com/dell/doradus/service/db/cql/CQLStatementCache.java
CQLStatementCache.getPreparedUpdate
public PreparedStatement getPreparedUpdate(String tableName, Update update) { synchronized (m_prepUpdateMap) { Map<Update, PreparedStatement> statementMap = m_prepUpdateMap.get(tableName); if (statementMap == null) { statementMap = new HashMap<>(); m_prepU...
java
public PreparedStatement getPreparedUpdate(String tableName, Update update) { synchronized (m_prepUpdateMap) { Map<Update, PreparedStatement> statementMap = m_prepUpdateMap.get(tableName); if (statementMap == null) { statementMap = new HashMap<>(); m_prepU...
[ "public", "PreparedStatement", "getPreparedUpdate", "(", "String", "tableName", ",", "Update", "update", ")", "{", "synchronized", "(", "m_prepUpdateMap", ")", "{", "Map", "<", "Update", ",", "PreparedStatement", ">", "statementMap", "=", "m_prepUpdateMap", ".", "...
Get the given prepared statement for the given table and update. Upon first invocation for a given combo, the query is parsed and cached. @param tableName Name of table to customize update for. @param update Inquiry {@link Update}. @return PreparedStatement for given combo.
[ "Get", "the", "given", "prepared", "statement", "for", "the", "given", "table", "and", "update", ".", "Upon", "first", "invocation", "for", "a", "given", "combo", "the", "query", "is", "parsed", "and", "cached", "." ]
ad64d3c37922eefda68ec8869ef089c1ca604b70
https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-server/src/main/java/com/dell/doradus/service/db/cql/CQLStatementCache.java#L115-L129
train
QSFT/Doradus
doradus-server/src/main/java/com/dell/doradus/service/db/Tenant.java
Tenant.getTenant
public static Tenant getTenant(ApplicationDefinition appDef) { String tenantName = appDef.getTenantName(); if (Utils.isEmpty(tenantName)) { return TenantService.instance().getDefaultTenant(); } TenantDefinition tenantDef = TenantService.instance().getTenantDefinition(tenantNa...
java
public static Tenant getTenant(ApplicationDefinition appDef) { String tenantName = appDef.getTenantName(); if (Utils.isEmpty(tenantName)) { return TenantService.instance().getDefaultTenant(); } TenantDefinition tenantDef = TenantService.instance().getTenantDefinition(tenantNa...
[ "public", "static", "Tenant", "getTenant", "(", "ApplicationDefinition", "appDef", ")", "{", "String", "tenantName", "=", "appDef", ".", "getTenantName", "(", ")", ";", "if", "(", "Utils", ".", "isEmpty", "(", "tenantName", ")", ")", "{", "return", "TenantSe...
Create a Tenant object from the given application definition. If the application does not define a tenant, the Tenant for the default database is returned. @param appDef {@link ApplicationDefinition} @return {@link Tenant} in which application resides.
[ "Create", "a", "Tenant", "object", "from", "the", "given", "application", "definition", ".", "If", "the", "application", "does", "not", "define", "a", "tenant", "the", "Tenant", "for", "the", "default", "database", "is", "returned", "." ]
ad64d3c37922eefda68ec8869ef089c1ca604b70
https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-server/src/main/java/com/dell/doradus/service/db/Tenant.java#L43-L51
train
QSFT/Doradus
doradus-server/src/main/java/com/dell/doradus/service/db/DBManagerService.java
DBManagerService.getDefaultDB
public DBService getDefaultDB() { String defaultTenantName = TenantService.instance().getDefaultTenantName(); synchronized (m_tenantDBMap) { DBService dbservice = m_tenantDBMap.get(defaultTenantName); assert dbservice != null : "Database for default tenant not found"; ...
java
public DBService getDefaultDB() { String defaultTenantName = TenantService.instance().getDefaultTenantName(); synchronized (m_tenantDBMap) { DBService dbservice = m_tenantDBMap.get(defaultTenantName); assert dbservice != null : "Database for default tenant not found"; ...
[ "public", "DBService", "getDefaultDB", "(", ")", "{", "String", "defaultTenantName", "=", "TenantService", ".", "instance", "(", ")", ".", "getDefaultTenantName", "(", ")", ";", "synchronized", "(", "m_tenantDBMap", ")", "{", "DBService", "dbservice", "=", "m_te...
Get the DBService for the default database. This object is created when the DBManagerService is started. @return {@link DBService} for the defaultdatabase.
[ "Get", "the", "DBService", "for", "the", "default", "database", ".", "This", "object", "is", "created", "when", "the", "DBManagerService", "is", "started", "." ]
ad64d3c37922eefda68ec8869ef089c1ca604b70
https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-server/src/main/java/com/dell/doradus/service/db/DBManagerService.java#L81-L88
train
QSFT/Doradus
doradus-server/src/main/java/com/dell/doradus/service/db/DBManagerService.java
DBManagerService.getTenantDB
public DBService getTenantDB(Tenant tenant) { synchronized (m_tenantDBMap) { DBService dbservice = m_tenantDBMap.get(tenant.getName()); if (dbservice == null) { dbservice = createTenantDBService(tenant); m_tenantDBMap.put(tenant.getName(), dbservice); ...
java
public DBService getTenantDB(Tenant tenant) { synchronized (m_tenantDBMap) { DBService dbservice = m_tenantDBMap.get(tenant.getName()); if (dbservice == null) { dbservice = createTenantDBService(tenant); m_tenantDBMap.put(tenant.getName(), dbservice); ...
[ "public", "DBService", "getTenantDB", "(", "Tenant", "tenant", ")", "{", "synchronized", "(", "m_tenantDBMap", ")", "{", "DBService", "dbservice", "=", "m_tenantDBMap", ".", "get", "(", "tenant", ".", "getName", "(", ")", ")", ";", "if", "(", "dbservice", ...
Get the DBService for the given tenant. The DBService is created if necessary, causing it to connect to its underlying DB. An exception is thrown if the DB cannot be connected. @param tenant {@link Tenant} to get DBService for. @return {@link DBService} that manages data for that tenant.
[ "Get", "the", "DBService", "for", "the", "given", "tenant", ".", "The", "DBService", "is", "created", "if", "necessary", "causing", "it", "to", "connect", "to", "its", "underlying", "DB", ".", "An", "exception", "is", "thrown", "if", "the", "DB", "cannot",...
ad64d3c37922eefda68ec8869ef089c1ca604b70
https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-server/src/main/java/com/dell/doradus/service/db/DBManagerService.java#L98-L112
train
QSFT/Doradus
doradus-server/src/main/java/com/dell/doradus/service/db/DBManagerService.java
DBManagerService.updateTenantDef
public void updateTenantDef(TenantDefinition tenantDef) { synchronized (m_tenantDBMap) { DBService dbservice = m_tenantDBMap.get(tenantDef.getName()); if (dbservice != null) { Tenant updatedTenant = new Tenant(tenantDef); m_logger.info("Updating DBService ...
java
public void updateTenantDef(TenantDefinition tenantDef) { synchronized (m_tenantDBMap) { DBService dbservice = m_tenantDBMap.get(tenantDef.getName()); if (dbservice != null) { Tenant updatedTenant = new Tenant(tenantDef); m_logger.info("Updating DBService ...
[ "public", "void", "updateTenantDef", "(", "TenantDefinition", "tenantDef", ")", "{", "synchronized", "(", "m_tenantDBMap", ")", "{", "DBService", "dbservice", "=", "m_tenantDBMap", ".", "get", "(", "tenantDef", ".", "getName", "(", ")", ")", ";", "if", "(", ...
Update the corresponding DBService with the given tenant definition. This method is called when an existing tenant is modified. If the DBService for the tenant has not yet been cached, this method is a no-op. Otherwise, the cached DBService is updated with the new tenant definition. @param tenantDef Updated {@link Ten...
[ "Update", "the", "corresponding", "DBService", "with", "the", "given", "tenant", "definition", ".", "This", "method", "is", "called", "when", "an", "existing", "tenant", "is", "modified", ".", "If", "the", "DBService", "for", "the", "tenant", "has", "not", "...
ad64d3c37922eefda68ec8869ef089c1ca604b70
https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-server/src/main/java/com/dell/doradus/service/db/DBManagerService.java#L122-L131
train
QSFT/Doradus
doradus-server/src/main/java/com/dell/doradus/service/db/DBManagerService.java
DBManagerService.deleteTenantDB
public void deleteTenantDB(Tenant tenant) { synchronized (m_tenantDBMap) { DBService dbservice = m_tenantDBMap.remove(tenant.getName()); if (dbservice != null) { m_logger.info("Stopping DBService for deleted tenant: {}", tenant.getName()); dbservice.stop()...
java
public void deleteTenantDB(Tenant tenant) { synchronized (m_tenantDBMap) { DBService dbservice = m_tenantDBMap.remove(tenant.getName()); if (dbservice != null) { m_logger.info("Stopping DBService for deleted tenant: {}", tenant.getName()); dbservice.stop()...
[ "public", "void", "deleteTenantDB", "(", "Tenant", "tenant", ")", "{", "synchronized", "(", "m_tenantDBMap", ")", "{", "DBService", "dbservice", "=", "m_tenantDBMap", ".", "remove", "(", "tenant", ".", "getName", "(", ")", ")", ";", "if", "(", "dbservice", ...
Close the DBService for the given tenant, if is has been cached. This is called when a tenant is deleted. @param tenant {@link Tenant} being deleted.
[ "Close", "the", "DBService", "for", "the", "given", "tenant", "if", "is", "has", "been", "cached", ".", "This", "is", "called", "when", "a", "tenant", "is", "deleted", "." ]
ad64d3c37922eefda68ec8869ef089c1ca604b70
https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-server/src/main/java/com/dell/doradus/service/db/DBManagerService.java#L139-L147
train
QSFT/Doradus
doradus-server/src/main/java/com/dell/doradus/service/db/DBManagerService.java
DBManagerService.getActiveTenantInfo
public SortedMap<String, SortedMap<String, Object>> getActiveTenantInfo() { SortedMap<String, SortedMap<String, Object>> activeTenantMap = new TreeMap<>(); synchronized (m_tenantDBMap) { for (String tenantName : m_tenantDBMap.keySet()) { DBService dbservice = m_tenantDBMap.ge...
java
public SortedMap<String, SortedMap<String, Object>> getActiveTenantInfo() { SortedMap<String, SortedMap<String, Object>> activeTenantMap = new TreeMap<>(); synchronized (m_tenantDBMap) { for (String tenantName : m_tenantDBMap.keySet()) { DBService dbservice = m_tenantDBMap.ge...
[ "public", "SortedMap", "<", "String", ",", "SortedMap", "<", "String", ",", "Object", ">", ">", "getActiveTenantInfo", "(", ")", "{", "SortedMap", "<", "String", ",", "SortedMap", "<", "String", ",", "Object", ">", ">", "activeTenantMap", "=", "new", "Tree...
Get the information about all active tenants, which are those whose DBService has been created. The is keyed by tenant name, and its value is a map of parameters configured for the corresponding DBService. @return Map of information for all active tenants.
[ "Get", "the", "information", "about", "all", "active", "tenants", "which", "are", "those", "whose", "DBService", "has", "been", "created", ".", "The", "is", "keyed", "by", "tenant", "name", "and", "its", "value", "is", "a", "map", "of", "parameters", "conf...
ad64d3c37922eefda68ec8869ef089c1ca604b70
https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-server/src/main/java/com/dell/doradus/service/db/DBManagerService.java#L156-L166
train
QSFT/Doradus
doradus-server/src/main/java/com/dell/doradus/service/db/DBManagerService.java
DBManagerService.createDefaultDBService
private DBService createDefaultDBService() { m_logger.info("Creating DBService for default tenant"); String dbServiceName = ServerParams.instance().getModuleParamString("DBService", "dbservice"); if (Utils.isEmpty(dbServiceName)) { throw new RuntimeException("'DBService.dbservice' pa...
java
private DBService createDefaultDBService() { m_logger.info("Creating DBService for default tenant"); String dbServiceName = ServerParams.instance().getModuleParamString("DBService", "dbservice"); if (Utils.isEmpty(dbServiceName)) { throw new RuntimeException("'DBService.dbservice' pa...
[ "private", "DBService", "createDefaultDBService", "(", ")", "{", "m_logger", ".", "info", "(", "\"Creating DBService for default tenant\"", ")", ";", "String", "dbServiceName", "=", "ServerParams", ".", "instance", "(", ")", ".", "getModuleParamString", "(", "\"DBServ...
throws a DBNotAvailableException, keep trying.
[ "throws", "a", "DBNotAvailableException", "keep", "trying", "." ]
ad64d3c37922eefda68ec8869ef089c1ca604b70
https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-server/src/main/java/com/dell/doradus/service/db/DBManagerService.java#L172-L221
train
QSFT/Doradus
doradus-server/src/main/java/com/dell/doradus/service/db/DBManagerService.java
DBManagerService.createTenantDBService
private DBService createTenantDBService(Tenant tenant) { m_logger.info("Creating DBService for tenant: {}", tenant.getName()); Map<String, Object> dbServiceParams = tenant.getDefinition().getOptionMap("DBService"); String dbServiceName = null; if (dbServiceParams == null || !dbServicePar...
java
private DBService createTenantDBService(Tenant tenant) { m_logger.info("Creating DBService for tenant: {}", tenant.getName()); Map<String, Object> dbServiceParams = tenant.getDefinition().getOptionMap("DBService"); String dbServiceName = null; if (dbServiceParams == null || !dbServicePar...
[ "private", "DBService", "createTenantDBService", "(", "Tenant", "tenant", ")", "{", "m_logger", ".", "info", "(", "\"Creating DBService for tenant: {}\"", ",", "tenant", ".", "getName", "(", ")", ")", ";", "Map", "<", "String", ",", "Object", ">", "dbServicePara...
Create a new DBService for the given tenant.
[ "Create", "a", "new", "DBService", "for", "the", "given", "tenant", "." ]
ad64d3c37922eefda68ec8869ef089c1ca604b70
https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-server/src/main/java/com/dell/doradus/service/db/DBManagerService.java#L224-L256
train
QSFT/Doradus
doradus-server/src/main/java/com/dell/doradus/service/db/DBManagerService.java
DBManagerService.sameTenantDefs
private static boolean sameTenantDefs(TenantDefinition tenantDef1, TenantDefinition tenantDef2) { return isEqual(tenantDef1.getProperty(TenantService.CREATED_ON_PROP), tenantDef2.getProperty(TenantService.CREATED_ON_PROP)) && isEqual(tenantDef1.getProperty(TenantService.CRE...
java
private static boolean sameTenantDefs(TenantDefinition tenantDef1, TenantDefinition tenantDef2) { return isEqual(tenantDef1.getProperty(TenantService.CREATED_ON_PROP), tenantDef2.getProperty(TenantService.CREATED_ON_PROP)) && isEqual(tenantDef1.getProperty(TenantService.CRE...
[ "private", "static", "boolean", "sameTenantDefs", "(", "TenantDefinition", "tenantDef1", ",", "TenantDefinition", "tenantDef2", ")", "{", "return", "isEqual", "(", "tenantDef1", ".", "getProperty", "(", "TenantService", ".", "CREATED_ON_PROP", ")", ",", "tenantDef2", ...
stamps, allowing for either property to be null for older definitions.
[ "stamps", "allowing", "for", "either", "property", "to", "be", "null", "for", "older", "definitions", "." ]
ad64d3c37922eefda68ec8869ef089c1ca604b70
https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-server/src/main/java/com/dell/doradus/service/db/DBManagerService.java#L260-L265
train
QSFT/Doradus
doradus-server/src/main/java/com/dell/doradus/service/db/DBManagerService.java
DBManagerService.isEqual
private static boolean isEqual(String string1, String string2) { return (string1 == null && string2 == null) || (string1 != null && string1.equals(string2)); }
java
private static boolean isEqual(String string1, String string2) { return (string1 == null && string2 == null) || (string1 != null && string1.equals(string2)); }
[ "private", "static", "boolean", "isEqual", "(", "String", "string1", ",", "String", "string2", ")", "{", "return", "(", "string1", "==", "null", "&&", "string2", "==", "null", ")", "||", "(", "string1", "!=", "null", "&&", "string1", ".", "equals", "(", ...
Both strings are null or equal.
[ "Both", "strings", "are", "null", "or", "equal", "." ]
ad64d3c37922eefda68ec8869ef089c1ca604b70
https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-server/src/main/java/com/dell/doradus/service/db/DBManagerService.java#L268-L270
train
QSFT/Doradus
doradus-client/src/main/java/com/dell/doradus/client/utils/CSVLoader.java
CSVLoader.createApplication
private void createApplication() { String schema = getSchema(); ContentType contentType = null; if (m_config.schema.toLowerCase().endsWith(".json")) { contentType = ContentType.APPLICATION_JSON; } else if (m_config.schema.toLowerCase().endsWith(".xml")) { co...
java
private void createApplication() { String schema = getSchema(); ContentType contentType = null; if (m_config.schema.toLowerCase().endsWith(".json")) { contentType = ContentType.APPLICATION_JSON; } else if (m_config.schema.toLowerCase().endsWith(".xml")) { co...
[ "private", "void", "createApplication", "(", ")", "{", "String", "schema", "=", "getSchema", "(", ")", ";", "ContentType", "contentType", "=", "null", ";", "if", "(", "m_config", ".", "schema", ".", "toLowerCase", "(", ")", ".", "endsWith", "(", "\".json\"...
Create the application from the configured schema file name.
[ "Create", "the", "application", "from", "the", "configured", "schema", "file", "name", "." ]
ad64d3c37922eefda68ec8869ef089c1ca604b70
https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-client/src/main/java/com/dell/doradus/client/utils/CSVLoader.java#L244-L272
train
QSFT/Doradus
doradus-client/src/main/java/com/dell/doradus/client/utils/CSVLoader.java
CSVLoader.deleteApplication
private void deleteApplication() { ApplicationDefinition appDef = m_client.getAppDef(m_config.app); if (appDef != null) { m_logger.info("Deleting existing application: {}", appDef.getAppName()); m_client.deleteApplication(appDef.getAppName(), appDef.getKey()); } ...
java
private void deleteApplication() { ApplicationDefinition appDef = m_client.getAppDef(m_config.app); if (appDef != null) { m_logger.info("Deleting existing application: {}", appDef.getAppName()); m_client.deleteApplication(appDef.getAppName(), appDef.getKey()); } ...
[ "private", "void", "deleteApplication", "(", ")", "{", "ApplicationDefinition", "appDef", "=", "m_client", ".", "getAppDef", "(", "m_config", ".", "app", ")", ";", "if", "(", "appDef", "!=", "null", ")", "{", "m_logger", ".", "info", "(", "\"Deleting existin...
Delete existing application if it exists.
[ "Delete", "existing", "application", "if", "it", "exists", "." ]
ad64d3c37922eefda68ec8869ef089c1ca604b70
https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-client/src/main/java/com/dell/doradus/client/utils/CSVLoader.java#L275-L281
train
QSFT/Doradus
doradus-client/src/main/java/com/dell/doradus/client/utils/CSVLoader.java
CSVLoader.determineTableFromFileName
private TableDefinition determineTableFromFileName(String fileName) { ApplicationDefinition appDef = m_session.getAppDef(); for (String tableName : m_tableNameList) { if (fileName.regionMatches(true, 0, tableName, 0, tableName.length())) { return appDef.getTableDef(tableN...
java
private TableDefinition determineTableFromFileName(String fileName) { ApplicationDefinition appDef = m_session.getAppDef(); for (String tableName : m_tableNameList) { if (fileName.regionMatches(true, 0, tableName, 0, tableName.length())) { return appDef.getTableDef(tableN...
[ "private", "TableDefinition", "determineTableFromFileName", "(", "String", "fileName", ")", "{", "ApplicationDefinition", "appDef", "=", "m_session", ".", "getAppDef", "(", ")", ";", "for", "(", "String", "tableName", ":", "m_tableNameList", ")", "{", "if", "(", ...
table name that matches the starting characters of the CSV file name.
[ "table", "name", "that", "matches", "the", "starting", "characters", "of", "the", "CSV", "file", "name", "." ]
ad64d3c37922eefda68ec8869ef089c1ca604b70
https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-client/src/main/java/com/dell/doradus/client/utils/CSVLoader.java#L285-L293
train
QSFT/Doradus
doradus-client/src/main/java/com/dell/doradus/client/utils/CSVLoader.java
CSVLoader.getFieldListFromHeader
private List<String> getFieldListFromHeader(BufferedReader reader) { // Read the first line and watch out for BOM at the front of the header. String header = null; try { header = reader.readLine(); } catch (IOException e) { // Leave header null } ...
java
private List<String> getFieldListFromHeader(BufferedReader reader) { // Read the first line and watch out for BOM at the front of the header. String header = null; try { header = reader.readLine(); } catch (IOException e) { // Leave header null } ...
[ "private", "List", "<", "String", ">", "getFieldListFromHeader", "(", "BufferedReader", "reader", ")", "{", "// Read the first line and watch out for BOM at the front of the header.\r", "String", "header", "=", "null", ";", "try", "{", "header", "=", "reader", ".", "rea...
Extract the field names from the given CSV header line and return as a list.
[ "Extract", "the", "field", "names", "from", "the", "given", "CSV", "header", "line", "and", "return", "as", "a", "list", "." ]
ad64d3c37922eefda68ec8869ef089c1ca604b70
https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-client/src/main/java/com/dell/doradus/client/utils/CSVLoader.java#L301-L329
train
QSFT/Doradus
doradus-client/src/main/java/com/dell/doradus/client/utils/CSVLoader.java
CSVLoader.getSchema
private String getSchema() { if (Utils.isEmpty(m_config.schema)) { m_config.schema = m_config.root + m_config.app + ".xml"; } File schemaFile = new File(m_config.schema); if (!schemaFile.exists()) { logErrorThrow("Schema file not found: {}", m_config.schema)...
java
private String getSchema() { if (Utils.isEmpty(m_config.schema)) { m_config.schema = m_config.root + m_config.app + ".xml"; } File schemaFile = new File(m_config.schema); if (!schemaFile.exists()) { logErrorThrow("Schema file not found: {}", m_config.schema)...
[ "private", "String", "getSchema", "(", ")", "{", "if", "(", "Utils", ".", "isEmpty", "(", "m_config", ".", "schema", ")", ")", "{", "m_config", ".", "schema", "=", "m_config", ".", "root", "+", "m_config", ".", "app", "+", "\".xml\"", ";", "}", "File...
Load schema contents from m_config.schema file.
[ "Load", "schema", "contents", "from", "m_config", ".", "schema", "file", "." ]
ad64d3c37922eefda68ec8869ef089c1ca604b70
https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-client/src/main/java/com/dell/doradus/client/utils/CSVLoader.java#L332-L350
train
QSFT/Doradus
doradus-client/src/main/java/com/dell/doradus/client/utils/CSVLoader.java
CSVLoader.loadTables
private void loadTables() { ApplicationDefinition appDef = m_session.getAppDef(); m_tableNameList = new ArrayList<String>(appDef.getTableDefinitions().keySet()); Collections.sort(m_tableNameList, new Comparator<String>() { @Override public int compare(String s1, Stri...
java
private void loadTables() { ApplicationDefinition appDef = m_session.getAppDef(); m_tableNameList = new ArrayList<String>(appDef.getTableDefinitions().keySet()); Collections.sort(m_tableNameList, new Comparator<String>() { @Override public int compare(String s1, Stri...
[ "private", "void", "loadTables", "(", ")", "{", "ApplicationDefinition", "appDef", "=", "m_session", ".", "getAppDef", "(", ")", ";", "m_tableNameList", "=", "new", "ArrayList", "<", "String", ">", "(", "appDef", ".", "getTableDefinitions", "(", ")", ".", "k...
ordering to match CSV file names correctly.
[ "ordering", "to", "match", "CSV", "file", "names", "correctly", "." ]
ad64d3c37922eefda68ec8869ef089c1ca604b70
https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-client/src/main/java/com/dell/doradus/client/utils/CSVLoader.java#L354-L366
train