sha256 stringlengths 64 64 | language stringclasses 28
values | size int32 1 491k | lines int32 1 23.2k | content stringlengths 1 200k |
|---|---|---|---|---|
98b7027b98abe3aa0c05387823d36627c3549d3847877212bb04a07e0c1b88b5 | Java | 305 | 10 | // generated automatically, do not modify.
package io.ray.api.function;
/** Functional interface for a remote function that has 5 parameters. */
@FunctionalInterface
public interface RayFunc5<T0, T1, T2, T3, T4, R> extends RayFuncR<R> {
R apply(T0 t0, T1 t1, T2 t2, T3 t3, T4 t4) throws Exception;
}
|
ae7e223f6e98818ee6924f029644a14a03ad390d3bd953e837e1d4dab75109a6 | Java | 308 | 10 | package io.ray.api.runtimeenv.types;
public class RuntimeEnvName {
/** The environment variables which type is `Map<String, String>`. */
public static final String ENV_VARS = "env_vars";
/** The dependent java jars which type is `List<String>`. */
public static final String JARS = "java_jars";
}
|
e26daf625f5be29af8550e73cf27be7112dc5fc45aa4583c3c012597713066d3 | Java | 309 | 10 | // generated automatically, do not modify.
package io.ray.api.function;
/** Functional interface for a remote function that has 5 parameters. */
@FunctionalInterface
public interface RayFuncVoid5<T0, T1, T2, T3, T4> extends RayFuncVoid {
void apply(T0 t0, T1 t1, T2 t2, T3 t3, T4 t4) throws Exception;
}
|
5ccf303faf8f5bd7e13aeb72c778df325a82b04f978d48f22ad5c60807a2721c | Java | 316 | 10 | // generated automatically, do not modify.
package io.ray.api.function;
/** Functional interface for a remote function that has 6 parameters. */
@FunctionalInterface
public interface RayFunc6<T0, T1, T2, T3, T4, T5, R> extends RayFuncR<R> {
R apply(T0 t0, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5) throws Exception;
}
|
7622d3ca5bbb15942dae85ef5e31d7748388e1d3e4c9bc5e55903a28105a8e88 | Java | 320 | 10 | // generated automatically, do not modify.
package io.ray.api.function;
/** Functional interface for a remote function that has 6 parameters. */
@FunctionalInterface
public interface RayFuncVoid6<T0, T1, T2, T3, T4, T5> extends RayFuncVoid {
void apply(T0 t0, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5) throws Exception;
}
|
9dca1d01268ae2357074376107296a42fca2605b269a5727c724a1779cd039fc | Java | 326 | 14 | package io.ray.api.runtimecontext;
/** A class that contains resource id and capacity of this resource. */
public class ResourceValue {
public final Long resourceId;
public final Double capacity;
ResourceValue(long resourceId, double capacity) {
this.resourceId = resourceId;
this.capacity = capacity;
... |
c71adf69ebb1e97049119d8d86dbe3c4c9c83abd1035f0329bdbb4bcf8758241 | Java | 328 | 12 | package io.ray.api.exception;
public class RayTaskException extends RayException {
public RayTaskException(String message) {
super(message);
}
public RayTaskException(int pid, String ipAddress, String message, Throwable cause) {
super(String.format("(pid=%d, ip=%s) %s", pid, ipAddress, message), cause)... |
0d30744289a2b45df93da6bb4cd34670f95f370fe5b474f0547da24254b64113 | Java | 330 | 15 | package io.ray.api.options;
/** The enumeration class is used for declaring lifetime of actors. */
public enum ActorLifetime {
DETACHED("DETACHED", 0),
NON_DETACHED("NON_DETACHED", 1);
private String name;
private int value;
ActorLifetime(String name, int value) {
this.name = name;
this.value = val... |
e3ff23c18c1ae1fec90d42a8c53f3b6d8c2ab3feaa2dc18efeae2a7f09901fb9 | Java | 331 | 15 | package io.ray.serve.poll;
import org.testng.Assert;
import org.testng.annotations.Test;
public class KeyListenerTest {
@Test
public void test() throws Throwable {
int[] a = new int[] {0};
KeyListener keyListener = (x) -> ((int[]) x)[0] = 1;
keyListener.notifyChanged(a);
Assert.assertEquals(a[0],... |
d1ff9108914d0984bc0ed84742f09302919bb53a802514028a5d76cd0bf39226 | Java | 332 | 15 | package io.ray.serve.util;
import org.testng.Assert;
import org.testng.annotations.Test;
public class CommonUtilTest {
public static class InnerTest {}
@Test
public void getSimpleClassNameTest() {
String name = CommonUtil.getDeploymentName(InnerTest.class.getName());
Assert.assertEquals(name, "InnerTe... |
d8d73378b97a7fb5dee118f23df073053f09cea1651ec85206eb2afff15147d7 | Java | 347 | 12 | package io.ray.api.exception;
/** Indicate that there are some thing have timed out, including `Ray.get()` or others. */
public class RayTimeoutException extends RayException {
public RayTimeoutException(String message) {
super(message);
}
public RayTimeoutException(String message, Throwable cause) {
su... |
ce39ea25ea1fd9cc763fac81a7133a34a5928cf9ed94f216035dac31aa43cec9 | Java | 359 | 13 | package gov.nih.nlm.malaria_screener;
import android.app.Application;
import android.test.ApplicationTestCase;
/**
* <a href="http://d.android.com/tools/testing/testing_android.html">Testing Fundamentals</a>
*/
public class ApplicationTest extends ApplicationTestCase<Application> {
public ApplicationTest() {
... |
89bd5bc386da195ca4328b717b5a24d5b5616630f517a80747b933ea41ee2204 | Java | 365 | 15 | package io.ray.runtime.serializer;
import org.apache.commons.lang3.tuple.Pair;
public class Serializer {
public static Pair<byte[], Boolean> encode(Object obj) {
return MessagePackSerializer.encode(obj);
}
@SuppressWarnings("unchecked")
public static <T> T decode(byte[] bs, Class<?> type) {
return M... |
2ea35c938db09551a42b900fab065d535983a0f0965b02c3b384abe2be1a4c63 | Java | 366 | 16 | package io.ray.serve.exception;
import io.ray.api.exception.RayException;
public class RayServeException extends RayException {
private static final long serialVersionUID = 4673951342965950469L;
public RayServeException(String message) {
super(message);
}
public RayServeException(String message, Throwa... |
401f79aecf9478b9803a24cb1a266e2a27a35532582d454349904e49ed7e7793 | Java | 372 | 19 | package io.ray.test;
import org.testng.IRetryAnalyzer;
import org.testng.ITestResult;
public class RetryAnalyzer implements IRetryAnalyzer {
private int counter = 0;
private static final int RETRY_LIMIT = 2;
@Override
public boolean retry(ITestResult result) {
if (counter < RETRY_LIMIT) {
counter+... |
837f6769b7b5bf9defbde0491a9dc97f0017020d30432322fdd54eb564af9b69 | Java | 374 | 14 | package io.ray.test;
import io.ray.runtime.util.SystemConfig;
import org.testng.Assert;
import org.testng.annotations.Test;
@Test(groups = "cluster")
public class SystemConfigTest extends BaseTest {
public void testDefaultConfigs() {
long ret = ((Double) SystemConfig.get("max_direct_call_object_size")).longVal... |
2d1b2aef8296357376ec3e183243a71c343967fccc30d31b31ee0adf9fc1adb1 | Java | 377 | 13 | package io.ray.api.exception;
/** The exception represents that there is an intentional system exit. */
public class RayIntentionalSystemExitException extends RuntimeException {
public RayIntentionalSystemExitException(String message) {
super(message);
}
public RayIntentionalSystemExitException(String mess... |
217d22a67395f2fe048a97393ea3d190f9d1e2484c8a1e9b725f925a71557de4 | Java | 379 | 25 | //
// This file is auto-generated. Please don't modify it!
//
package org.opencv.ml;
// C++: class Ml
//javadoc: Ml
public class Ml {
public static final int
VAR_NUMERICAL = 0,
VAR_ORDERED = 0,
VAR_CATEGORICAL = 1,
TEST_ERROR = 0,
TRAIN_ERROR = 1,
... |
0a1d8b79e02c0185c5a7b691ba83c4334654c59401a5bc5f9682242d21b4b891 | Java | 388 | 21 | package io.ray.test;
public class TestActor {
public TestActor(byte[] v) {
value = v;
}
public byte[] concat(byte[] v) {
byte[] c = new byte[value.length + v.length];
System.arraycopy(value, 0, c, 0, value.length);
System.arraycopy(v, 0, c, value.length, v.length);
return c;
}
public b... |
a02e6197a846520b27965b7c4b96e5d35d97630be45dc817bae44e051330e96a | Java | 398 | 22 | package io.ray.serve.replica;
public interface RayServeReplica {
Object handleRequest(Object requestMetadata, Object requestArgs);
default Object reconfigure(byte[] deploymentConfigBytes) {
return null;
}
default boolean checkHealth() {
return true;
}
default boolean prepareForShutdown() {
... |
9e375edf6109b8115a8363a944da3440f8a1b2b4c5f7d2d6dddd3996545ba268 | Java | 400 | 14 | package io.ray.api.concurrencygroup.annotations;
import java.lang.annotation.ElementType;
import java.lang.annotation.Inherited;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
@Target(ElementType.TYPE)
@Inherited
@Retention(RetentionPolicy.RUNTI... |
4027ab40cec7ea14cb4a2aff979f2a3020a670ab7a788db0c67c06ee48eeb9f9 | Java | 404 | 15 | package io.ray.api.concurrencygroup.annotations;
import java.lang.annotation.ElementType;
import java.lang.annotation.Inherited;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
@Target(ElementType.METHOD)
@Inherited
@Retention(RetentionPolicy.RUN... |
692bb01d4c55f10b7922dfdf20857234c782ed68848931104a71394a1669c059 | Java | 409 | 13 | package io.ray.api.parallelactor;
import io.ray.api.ObjectRef;
import io.ray.api.function.RayFunc;
import io.ray.api.function.RayFuncR;
public interface ParallelActorContext {
<A> ParallelActorHandle<A> createParallelActorExecutor(int parallelism, RayFuncR<A> ctorFunc);
<A, R> ObjectRef<R> submitTask(
Par... |
c4e1bf9313386b0b9af9f7226046c0189f91f5f50e9afaea3369b5788f84fe07 | Java | 427 | 19 | package io.ray.test;
import io.ray.api.Ray;
import org.testng.Assert;
import org.testng.annotations.Test;
/** Task Name Test. */
public class TaskNameTest extends BaseTest {
private static int testFoo() {
return 0;
}
/** Test setting task name at task submission time. */
@Test
public void testSetName(... |
c035e3e5a48b33f10d7fd8c1fdc15f06af702dc5ab0db3cf16821e6b65c6d047 | Java | 429 | 17 | package io.ray.api.exception;
import io.ray.api.id.ActorId;
/**
* Indicates that the back pressure occurs when submitting an actor task.
*
* <p>This exception could happen probably because the caller calls the callee too frequently.
*/
public class PendingCallsLimitExceededException extends RayException {
publ... |
e0c03bc6e15c45f7c3b1011f53e53d20c15ccb3278af029526aad4dab1e3cac9 | Java | 436 | 17 | package io.ray.api.exception;
/** Indicates that the worker died unexpectedly while executing a task. */
public class RayWorkerException extends RayException {
public RayWorkerException() {
super("The worker died unexpectedly while executing this task.");
}
public RayWorkerException(String message) {
s... |
eb992c45739fec77575bf1d84c65246a39fbd85835a5ac74507c79187cf75875 | Java | 442 | 16 | package io.ray.api.parallelactor;
import io.ray.api.ActorHandle;
/** The handle to a parallel actor. */
public interface ParallelActorHandle<A> {
/** Get an execution instance of the parallel actor by the given instance ID. */
ParallelActorInstance<A> getInstance(int instanceId);
/** Get the parallelism of th... |
778a35f71daa0bb62077f4dce44aef427dada37d20a303d54e56a45f4c0b484f | Java | 448 | 21 | package io.ray.test;
import io.ray.api.Ray;
import java.lang.reflect.Method;
import org.testng.Assert;
import org.testng.annotations.AfterMethod;
import org.testng.annotations.BeforeMethod;
public class BaseTest {
@BeforeMethod(alwaysRun = true)
public void setUpBase(Method method) {
Assert.assertFalse(Ray.i... |
94e4632a5f687163966306b5652d9f3f66626679e98474db14858f5ae4906c99 | Java | 448 | 18 | package io.ray.serve.handle;
import java.io.Serializable;
/** Options for each ServeHandle instances. These fields are immutable. */
public class HandleOptions implements Serializable {
private static final long serialVersionUID = -279077795726949172L;
private String methodName = "call";
public String getMeth... |
a288dfd22b668b22a13c9bef012d00b469985b59350ba4bf07d228ba319aa072 | Java | 453 | 15 | package io.ray.test;
import java.lang.reflect.Constructor;
import java.lang.reflect.Method;
import org.testng.IAnnotationTransformer;
import org.testng.annotations.ITestAnnotation;
public class AnnotationTransformer implements IAnnotationTransformer {
@Override
public void transform(
ITestAnnotation annota... |
54724fe8650b732b9c32a19368812c4f445cea7f3d04a76faa8cd0db0f2e05e4 | Java | 454 | 18 | // Theo Walker
// Max Planck Florida Institute
// naroom@gmail.com
package cellMagicWand;
public class PolarPixel {
// The polar transform is a 2D matrix of PolarPixels.
// Each PolarPixel represents a range of theta values along a ring of fixed radius.
// Hence, an PolarPixel represents the data from som... |
c4ba8fd1328590d62679e02e53569f67ed0bcf29dc1e5a606595f4c53c2f9c91 | Java | 462 | 11 | package lychi;
public final class Version {
public static final String VERSION = "20180207";
public static final String COMMIT = "fe2ea2a";
public static final String USER = "tyler";
public static final String TIMESTAMP = "02/07/2018 at 17:57:34 EST";
private Version () {}
public static void main ... |
6f3b64c45c910a33f53d7ef110d5d99c6f676b54bd9724f9e61b50869f2ec04f | Java | 465 | 23 | package io.ray.runtime.util.generator;
public abstract class BaseGenerator {
protected static final int MAX_PARAMETERS = 6;
protected StringBuilder sb;
protected void newLine(String line) {
sb.append(line).append("\n");
}
protected void newLine(int numIndents, String line) {
indents(numIndents);
... |
52ff350d54e0207fc219d6b18e2a2f16e775f089fab964dd3fb2d1f6cb601516 | Java | 470 | 21 | package io.ray.serve.replica;
import java.util.Map;
import java.util.concurrent.atomic.AtomicInteger;
public class DummyReplica {
private AtomicInteger counter = new AtomicInteger();
public String call() {
return String.valueOf(counter.incrementAndGet());
}
public void reconfigure(Object userConfig) {
... |
8d1296e18543e967b80f3340b5f77813b3f7c54e2ca8ad7c8adf049d526c27a0 | Java | 478 | 20 | package io.ray.test;
import io.ray.api.ObjectRef;
import io.ray.api.Ray;
import org.testng.Assert;
import org.testng.annotations.Test;
@Test(groups = {"cluster"})
public class MultiLanguageClusterTest extends BaseTest {
public static String echo(String word) {
return word;
}
@Test
public void testMultiL... |
7c83baa635a9d13cada91f96d32bdc51aabafa2ebfcdac86117fff23bd85b41d | Java | 490 | 22 | package io.ray.serve.docdemo;
// docs-strategy-start
import com.google.gson.Gson;
public class HttpStrategyOnRayServe {
static class BankIndicator {
long time;
String bank;
String indicator;
}
private Gson gson = new Gson();
public String call(String dataJson) {
BankIndicator data = gson.fr... |
2eeb28f3e53c388dcac9b07fc1384d92b3bbe6ce3f12cf34ce2ed7b563f0e95c | Java | 494 | 21 | package io.ray.api.parallelactor;
public class ParallelActorInstance<A> implements ActorCall<A> {
private ParallelActorHandle<A> parallelActorHandle;
private int instanceId;
public ParallelActorInstance(ParallelActorHandle<A> parallelActorHandle, int instanceId) {
this.parallelActorHandle = parallelActorH... |
ed1b03fd206c663757513a273b48230118b692bae4ffea814a5298eebb1467f7 | Java | 496 | 28 | package io.ray.benchmark;
import java.io.Serializable;
public class RemoteResult<T> implements Serializable {
private static final long serialVersionUID = -3825949468039358540L;
private long finishTime;
private T result;
public long getFinishTime() {
return finishTime;
}
public void setFinishTime... |
3fc5431353031c262d128fcf64100e4e6a254212efc057e66fa7b69200f86a48 | Java | 497 | 26 | package io.ray.benchmark;
import io.ray.api.ObjectRef;
public class RemoteResultWrapper<T> {
private long startTime;
private ObjectRef<RemoteResult<T>> objectRef;
public long getStartTime() {
return startTime;
}
public void setStartTime(long startTime) {
this.startTime = startTime;
}
public... |
7da48e0e529e1dcbef8ca35eeb64c0d8712f9a3d58e924f29944bf438838e1dc | Java | 510 | 24 | package io.ray.api.runtimecontext;
import io.ray.api.id.ActorId;
public class ActorInfo {
public final ActorId actorId;
public final ActorState state;
public final long numRestarts;
public final Address address;
public final String name;
public ActorInfo(
ActorId actorId, ActorState state, long... |
c0762a94fc4006f57bd025d85261ea278d01636b18bd7d869174747ac8b9b49e | Java | 513 | 19 | package io.ray.runtime.functionmanager;
import io.ray.runtime.generated.Common.Language;
import java.util.List;
/**
* Base interface of a Ray task's function descriptor.
*
* <p>A function descriptor is a list of strings that can uniquely describe a function. It's used to
* load a function in workers.
*/
public i... |
fd9beb513f32057976423fab1a9a5bbde9747c870e9ea65c5277424a6a2c830a | Java | 516 | 19 | package io.ray.serve.util;
import io.ray.serve.dag.ClassNode;
import io.ray.serve.dag.DAGNode;
import java.util.Optional;
public class DAGUtil {
public static String getNodeName(DAGNode node) {
String nodeName = null;
if (node instanceof ClassNode) {
nodeName =
Optional.ofNullable(node.getB... |
a5e577a014a6412c7a63260c58a99340e17c18cbffd4da5b14c23123e14d0789 | Java | 524 | 19 | package io.ray.api.concurrencygroup.annotations;
import java.lang.annotation.ElementType;
import java.lang.annotation.Inherited;
import java.lang.annotation.Repeatable;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
@Target(ElementType.TYPE)
@In... |
dc58cb166ed77ed74f4dcb2d20c80619ba26255e58d51a91f76c7da35990d5e9 | Java | 535 | 20 | package io.ray.api.call;
import io.ray.api.Ray;
import io.ray.api.function.RayFuncVoid;
/** A helper to call java remote function which doesn't have a return value. */
public class VoidTaskCaller extends BaseTaskCaller<VoidTaskCaller> {
private final RayFuncVoid func;
private final Object[] args;
public VoidTa... |
4cee7c2b1117dc736b52478305612e4cc07c3148a7a207be61c20f6e0ff85109 | Java | 537 | 24 | package io.ray.serve.poll;
import org.apache.commons.lang3.StringUtils;
/** The long poll namespace enum. */
public enum LongPollNamespace {
DEPLOYMENT_TARGETS,
ROUTE_TABLE;
public static LongPollNamespace parseFrom(String key) {
for (LongPollNamespace namespace : LongPollNamespace.values()) {
if (S... |
9f6da6283098165e16d4a638ee6c72b7acf2382d6e2bbc89738bd68a73de7b10 | Java | 544 | 30 | package io.ray.api.placementgroup;
/** State of placement group. */
public enum PlacementGroupState {
/** Wait for resource to schedule. */
PENDING(0),
/** The placement group has created on some node. */
CREATED(1),
/** The placement group has removed. */
REMOVED(2),
/** The placement group is resch... |
ffad98fbab45f69183b978e560d36dc2c9b720ef91a9f29af43b8e3c6b01e5bd | Java | 546 | 17 | package io.ray.runtime.runner.worker;
import io.ray.api.Ray;
import io.ray.runtime.AbstractRayRuntime;
/** Default implementation of the worker process. */
public class DefaultWorker {
public static void main(String[] args) {
// Set run-mode to `CLUSTER` explicitly, to prevent the DefaultWorker to receive
... |
932031dce9d04ab7ba569431a561b55897145ce53454a467fceff26aa0d447d1 | Java | 579 | 24 | package io.ray.serve.repdemo;
import io.ray.serve.api.Serve;
import io.ray.serve.deployment.Application;
import io.ray.serve.handle.DeploymentHandle;
public class DeploymentDemo {
private String msg;
public DeploymentDemo(String msg) {
this.msg = msg;
}
public String call() {
return msg;
}
publ... |
c084185075671acf211717a26a01eb2c2bcad06e5f78196e99fedd00d24a46e8 | Java | 584 | 21 | package io.ray.serve.dag;
import java.util.Map;
import java.util.function.Function;
public interface DAGNodeBase {
<T> T applyRecursive(Function<DAGNodeBase, T> fn);
<T> DAGNodeBase applyAndReplaceAllChildNodes(Function<DAGNodeBase, T> fn);
DAGNodeBase copy(
Object[] newArgs, Map<String, Object> newOpt... |
6e448f09fd202bd61995e229a4ef0c16e8bbd8d486f131c5e6605805129c1ffd | Java | 591 | 21 | package io.ray.test;
import com.google.common.collect.ImmutableList;
import java.util.List;
import org.testng.IClassListener;
import org.testng.ITestClass;
public class SystemPropertyListener implements IClassListener {
private final List<String> whitelist = ImmutableList.of("ray.run-mode");
@Override
public v... |
6ca9f91a9d697e9537bf7f1326e2080c0df7305f80fc9b7460494245ee51b3ae | Java | 596 | 32 | package io.ray.test;
import io.ray.api.ActorHandle;
import io.ray.api.Ray;
import java.util.concurrent.Semaphore;
public class SignalActor {
private Semaphore semaphore;
public SignalActor() {
this.semaphore = new Semaphore(0);
}
public int sendSignal() {
this.semaphore.release();
return 0;
}... |
8d9a592454109a51da0a575efd4753bb5f32491cc2683cdce985b0e0e3151032 | Java | 603 | 28 | package io.ray.serve.router;
import io.ray.serve.generated.RequestMetadata;
/** Wrap request arguments and meta data. */
public class Query {
private RequestMetadata metadata;
/**
* If this query is cross-language, the args is serialized {@link
* io.ray.serve.generated.RequestWrapper}. Otherwise, it is Ob... |
ecb80582e84933d7c70fe70165f897bf85f65af105f4b4526fc2bfec1d90c93b | Java | 607 | 24 | package io.ray.api;
/**
* Represents a reference to an object in the object store.
*
* @param <T> The object type.
*/
public interface ObjectRef<T> {
/**
* Fetch the object from the object store, this method will block until the object is locally
* available.
*/
T get();
/**
* Fetch the object ... |
4dbd60166ae1ff1025566d023fa11b1552bb0f47f04358ccfe944d193da946c2 | Java | 612 | 18 | package org.opencv.osgi;
import java.util.logging.Level;
import java.util.logging.Logger;
/**
* This class is intended to provide a convenient way to load OpenCV's native
* library from the Java bundle. If Blueprint is enabled in the OSGi container
* this class will be instantiated automatically and the init() met... |
d2ee4766852f857b3dffdf52a008525a9384ba3ca5ab7e83fc4e19c4d806bf2f | Java | 614 | 25 | package io.ray.api.parallelactor;
import io.ray.api.Ray;
import io.ray.api.function.RayFuncVoid;
public class VoidParallelActorTaskCaller {
private ParallelActorInstance instance;
private RayFuncVoid func;
private Object[] args;
public VoidParallelActorTaskCaller(
ParallelActorInstance instance, Ray... |
a8de5e26be8a9699d917eb49165336ee2b9b72eef54597f865607bf3dad8f25e | Java | 616 | 30 | package io.ray.serve.replica;
public class ReplicaName {
private String deploymentTag;
private String replicaSuffix;
private String replicaTag = "";
private String delimiter = "#";
public ReplicaName(String deploymentTag, String replicaSuffix) {
this.deploymentTag = deploymentTag;
this.replicaSu... |
908c1bac23ec357e47e8733169b6068f4f6c7ae41df0b17d801379d8441f117f | Java | 617 | 18 | /**
* Automatically generated file. DO NOT MODIFY
*/
package org.opencv;
public final class BuildConfig {
public static final boolean DEBUG = false;
public static final String LIBRARY_PACKAGE_NAME = "org.opencv";
/**
* @deprecated APPLICATION_ID is misleading in libraries. For the library package name use L... |
66ddaabb3dcbd84e8b6848042d5526238c4771382be67990b29a542ea07910b9 | Java | 618 | 19 | package io.ray.performancetest.test;
/**
* 1-to-1 ray call, one receiving actor and one sending actor, test the throughput of the engine
* itself.
*/
public class ActorPerformanceTestCase1 {
public static void main(String[] args) {
final int[] layers = new int[] {1, 1};
final int[] actorsPerLayer = new i... |
e7ad584c54f2974d5fb5709f8df45fce88e8ed4ada273fb8a5ca304fdc6cb2ea | Java | 621 | 40 | package io.ray.performancetest;
import java.nio.ByteBuffer;
public class Receiver {
private int value = 0;
public Receiver() {}
public boolean ping() {
return true;
}
public void noArgsNoReturn() {
value += 1;
}
public int noArgsHasReturn() {
value += 1;
return value;
}
public v... |
2e1323a3d5959e5507f5b3fce6517ecc11c70b02df4ab8c7a61a2186523f535a | Java | 629 | 26 | package io.ray.test;
import io.ray.api.ObjectRef;
import io.ray.api.Ray;
import org.testng.Assert;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test;
public class RedisPasswordTest extends BaseTest {
@BeforeClass
public void setUp() {
System.setProperty("ray.redis.username", "defa... |
7ed2d681bc369ceb6a7988daa052b5ed00976ded1b5597a7802df33c1cf41191 | Java | 632 | 21 | package io.ray.runtime.gcs;
import com.google.common.base.Preconditions;
import io.ray.runtime.config.RayConfig;
/** Options to create GCS Client. */
public class GcsClientOptions {
public String ip;
public int port;
public String username;
public String password;
public GcsClientOptions(RayConfig rayConfi... |
406b79241be564bc4abccd652eb4cc789038efb550bf34029ed20ee1e314f118 | Java | 638 | 18 | /**
* Automatically generated file. DO NOT MODIFY
*/
package org.opencv;
public final class BuildConfig {
public static final boolean DEBUG = Boolean.parseBoolean("true");
public static final String LIBRARY_PACKAGE_NAME = "org.opencv";
/**
* @deprecated APPLICATION_ID is misleading in libraries. For the lib... |
c7f568aec81156adffd4907021444de5e8d0853bc045c82d367f188c06d0c3ce | Java | 639 | 19 | package io.ray.serve.replica;
import org.apache.commons.lang3.RandomStringUtils;
import org.testng.Assert;
import org.testng.annotations.Test;
public class ReplicaNameTest {
@Test
public void test() {
String deploymentTag = "ReplicaNameTest";
String replicaSuffix = RandomStringUtils.randomAlphabetic(6);
... |
551a2b2144159e6db06ede9a463787887a867657cd91232cb8ad0ae27e99c844 | Java | 643 | 25 | package io.ray.api.parallelactor;
import io.ray.api.ObjectRef;
import io.ray.api.Ray;
import io.ray.api.function.RayFuncR;
public class ParallelActorTaskCaller<R> {
private ParallelActorInstance instance;
private RayFuncR<R> func;
private Object[] args;
public ParallelActorTaskCaller(ParallelActorInstance... |
7289816cd336092abb4bd9308e0a47a1eb2c95d17733894c2177e7040a26f1fe | Java | 647 | 27 | package io.ray.serve.dag;
import java.util.Map;
public class ClassNode extends DAGNode {
private String className;
public ClassNode(
String clsName,
Object[] clsArgs,
Map<String, Object> clsOptions,
Map<String, Object> otherArgsToResolve) {
super(clsArgs, clsOptions, otherArgsToResol... |
e52103284a2a791af3713ba2e1ada213a23b00054050a6ec868c911d8cba0ee9 | Java | 652 | 28 | package io.ray.api.parallelactor;
import io.ray.api.Ray;
import io.ray.api.function.RayFuncR;
public class ParallelActorCreator<A> {
private int parallelism = 1;
private RayFuncR<A> func;
private Object[] args;
public ParallelActorCreator(RayFuncR<A> func, Object[] args) {
this.func = func;
this.a... |
7fd05a26762611accb90dace1a21828c7d72ffde1278dd309bbd9ca14a2387f2 | Java | 653 | 28 | //
// This file is auto-generated. Please don't modify it!
//
package org.opencv.objdetect;
import org.opencv.core.Algorithm;
// C++: class BaseCascadeClassifier
//javadoc: BaseCascadeClassifier
public class BaseCascadeClassifier extends Algorithm {
protected BaseCascadeClassifier(long addr) { super(addr); }
... |
544016a58450b61e9d4e0fadac0104ba02549d04629162c0d448839128a64fb0 | Java | 661 | 24 | package io.ray.serve.poll;
import org.testng.Assert;
import org.testng.annotations.Test;
public class LongPollNamespaceTest {
@Test
public void toStringTest() {
String key = LongPollNamespace.ROUTE_TABLE.toString();
Assert.assertEquals(key, "LongPollNamespace.ROUTE_TABLE");
}
@Test
public void par... |
6926a4c3f4cebf1d47f780684e4deaed636b6438bb9dabffc6506508ab49043e | Java | 664 | 28 | package io.ray.api;
import java.util.List;
/**
* Represents the result of a Ray.wait call. It contains 2 lists, one containing the locally
* available objects, one containing the rest.
*/
public final class WaitResult<T> {
private final List<ObjectRef<T>> ready;
private final List<ObjectRef<T>> unready;
pu... |
96c0ad7a123562a99011821578ce6ea9135cd64306fe4c785d0f353c837a4009 | Java | 678 | 23 | package io.ray.test;
import io.ray.runtime.config.RayConfig;
import io.ray.runtime.config.RunMode;
import java.util.List;
import org.testng.IAlterSuiteListener;
import org.testng.xml.XmlGroups;
import org.testng.xml.XmlRun;
import org.testng.xml.XmlSuite;
public class RayAlterSuiteListener implements IAlterSuiteListe... |
040b028a652cbc129978ee79d1618e1551ebcdeff5e79fe3737da020aa158918 | Java | 701 | 34 | package org.opencv.android;
/**
* Installation callback interface.
*/
public interface InstallCallbackInterface
{
/**
* New package installation is required.
*/
static final int NEW_INSTALLATION = 0;
/**
* Current package installation is in progress.
*/
static final int INSTALLATI... |
ddfa62206a2c3fcfff0c834e85fcc3b35a9a87532481a7552a493c6ac79e4f6d | Java | 708 | 25 | package io.ray.api.call;
import io.ray.api.CppActorHandle;
import io.ray.api.Ray;
import io.ray.api.function.CppActorClass;
/** A helper to create cpp actor. */
public class CppActorCreator extends BaseActorCreator<CppActorCreator> {
private final CppActorClass cppActorClass;
private final Object[] args;
publi... |
bbb01c761c569666c7d5a98f446b8b906ac8985ffbdd213a8eb5ff840b9e4617 | Java | 712 | 18 | package io.ray.serve.config;
public class RayServeConfig {
public static final String PROXY_CLASS = "ray.serve.proxy.class";
public static final String PROXY_HTTP_PORT = "ray.serve.proxy.http.port";
public static final String METRICS_ENABLED = "ray.serve.metrics.enabled";
public static final String LONG_PO... |
e34b9c377ffd71e82b39d0f932314317082d432530332aece44b4572ba6ed071 | Java | 714 | 31 | package io.ray.serve.handle;
import io.ray.api.ObjectRef;
/**
* A future-like object wrapping the result of a unary deployment handle call.
*
* <p>From outside a deployment, `.result()` can be used to retrieve the output in a blocking
* manner.
*/
public class DeploymentResponse {
private ObjectRef<Object> obj... |
5c5e2aba84e3dc3f9ee8efa0ed697f486a9ff6c8cba275dec25ea585e94a99f8 | Java | 718 | 32 | package io.ray.api.placementgroup;
/** The actor placement strategy. */
public enum PlacementStrategy {
/** Packs Bundles close together inside nodes as tight as possible. */
PACK(0),
/** Places Bundles across distinct nodes as even as possible. */
SPREAD(1),
/** Packs Bundles into one node. The group is n... |
bbd85a91ce452a1f9106772a4d7e149db6350e047db0f00840cca985d76ebb43 | Java | 718 | 26 | package io.ray.runtime.actor;
import com.google.common.base.Preconditions;
import io.ray.api.ActorHandle;
import io.ray.runtime.generated.Common.Language;
import java.io.IOException;
import java.io.ObjectInput;
/** Java implementation of actor handle for cluster mode. */
public class NativeJavaActorHandle extends Nat... |
add8a042fa00e0540c237671325636792f0b5ff29b6e459deb8df5ad763e4694 | Java | 721 | 24 | package io.ray.api.function;
public class CppActorClass {
// The name of function creating the class.
public final String createFunctionName;
// The name of this actor class
public final String className;
private CppActorClass(String createFunctionName, String className) {
this.createFunctionName = crea... |
b787f739ef6145fb8c4530579e5cb960a6e39d1486578d3bc5d53d4538323383 | Java | 733 | 28 | package io.ray.serve.poll;
import com.google.common.base.Preconditions;
import io.ray.api.BaseActorHandle;
import java.util.Map;
/** The asynchronous long polling client. */
public class LongPollClient {
private Map<KeyType, KeyListener> keyListeners;
private boolean running;
public LongPollClient(BaseActorH... |
bca7101cca9d15e9a592d87e7b8f10df05fc52603817432d44d681cf56cf7b91 | Java | 734 | 35 | package io.ray.api.runtimecontext;
import io.ray.api.id.UniqueId;
import java.util.Objects;
public class Address {
public final UniqueId nodeId;
public final String ip;
public final int port;
public Address(UniqueId nodeId, String ip, int port) {
this.nodeId = nodeId;
this.ip = ip;
this.port = po... |
d46cad37dcb02a076809dbd9a86385fb07bcaa99565ece96d22eba45fe9929e9 | Java | 735 | 23 | package io.ray.runtime.util;
import org.apache.commons.lang3.exception.ExceptionUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
// Required by JNI macro RAY_CHECK_JAVA_EXCEPTION
public final class JniExceptionUtil {
private static final Logger LOGGER = LoggerFactory.getLogger(JniExceptionUtil.class... |
90fb47b8f86b8f7038f0766066e1c636a223e500fcf85dc159ad9e9b4045011d | Java | 751 | 30 | package io.ray.test;
import io.ray.api.ObjectRef;
import io.ray.api.Ray;
import org.testng.Assert;
import org.testng.annotations.Test;
/** Hello world. */
public class HelloWorldTest extends BaseTest {
private static String hello() {
return "hello";
}
private static String world() {
return "world!";
... |
ee23ab5f2f35e23f4e7eb74d3f46d99ced74947c52c64662ff7c076a838331a5 | Java | 779 | 32 | package io.ray.test;
import io.ray.api.ActorHandle;
import io.ray.api.ObjectRef;
import io.ray.api.Ray;
import org.testng.Assert;
import org.testng.annotations.Test;
@Test
public class GetCurrentActorHandleTest extends BaseTest {
private static class Echo {
public Echo() {}
public ObjectRef<String> echo(... |
8d9059dee8adf52e28969a12f82f69afbb4f71b2d59ad2b5eeffccb305188839 | Java | 797 | 26 | // Theo Walker
// Max Planck Florida Institute
// naroom@gmail.com
package cellMagicWand;
public class RingPixel {
// a RingPixel is a single pixel from the original image
// it is associated with a specific ring (e.g. r=5).
// Note that the mapping from cartesian pixels to ring pixels is not 1:1 --
... |
72589d1cdb7f174992bfa4bbc2ca8f79a6bf61c9b61bc8bbdb840c0b3975915d | Java | 801 | 32 | package io.ray.serve.deployment;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public class ExampleEchoDeployment {
String prefix;
String suffix = "";
private static final Logger LOGGER = LoggerFactory.getLogger(ExampleEchoDeployment.class);
public ExampleEchoDeployment(Object prefix) {
LOGGER... |
9932fdcf70524c45d1df2d631014417e94c90ca34fb1ea67339289cd231873e5 | Java | 802 | 31 | package io.ray.api.call;
import io.ray.api.ObjectRef;
import io.ray.api.Ray;
import io.ray.api.function.RayFuncR;
/**
* A helper to call java remote function.
*
* @param <R> The type of the java remote function return value
*/
public class TaskCaller<R> extends BaseTaskCaller<TaskCaller<R>> {
private final RayF... |
aab4a54957e3fbb694a865dd6591fba57a1d221f5c82769ab36440a2943e4284 | Java | 803 | 33 | package io.ray.benchmark;
import io.ray.api.ActorHandle;
import io.ray.api.ObjectRef;
import io.ray.api.Ray;
import org.testng.annotations.Test;
public class SingleLatencyTest extends RayBenchmarkTest {
public static final int totalNum = 10;
private static final long serialVersionUID = 3559601273941694468L;
p... |
0f39b95f0c7a7693af97894ce575bc71a57cff92015ace329a89b674fae42c16 | Java | 809 | 30 | package io.ray.api.call;
import io.ray.api.PyActorHandle;
import io.ray.api.Ray;
import io.ray.api.function.PyActorClass;
/** A helper to create python actor. */
public class PyActorCreator extends BaseActorCreator<PyActorCreator> {
private final PyActorClass pyActorClass;
private final Object[] args;
public P... |
2a3ef8f1f94437f439184df129311cc556c17f83dc85e0c5b7a85f95890e9754 | Java | 810 | 31 | package io.ray.api.call;
import io.ray.api.ObjectRef;
import io.ray.api.Ray;
import io.ray.api.function.CppFunction;
/**
* A helper to call cpp remote function.
*
* @param <R> The type of the cpp function return value
*/
public class CppTaskCaller<R> extends BaseTaskCaller<CppTaskCaller<R>> {
private final CppF... |
4326d1af1a2cf6fccfd1b5a902680a59b745dccf37b9b86c6bb7c3f1bc7aa512 | Java | 810 | 33 | package io.ray.runtime.context;
import io.ray.api.id.ActorId;
import io.ray.api.id.JobId;
import io.ray.api.id.TaskId;
import io.ray.api.id.UniqueId;
import io.ray.api.runtimeenv.RuntimeEnv;
import io.ray.runtime.generated.Common.Address;
import io.ray.runtime.generated.Common.TaskType;
/** The context of worker. */
... |
b5fd78dca7b35da0f8067a4e7caf6d94e6e158d8ef037f7d9313b7126c482a55 | Java | 813 | 31 | package io.ray.api.call;
import io.ray.api.ObjectRef;
import io.ray.api.Ray;
import io.ray.api.function.PyFunction;
/**
* A helper to call python remote function.
*
* @param <R> The type of the python function return value
*/
public class PyTaskCaller<R> extends BaseTaskCaller<PyTaskCaller<R>> {
private final P... |
8f8afac89df883c6c37b1f6a1b11e340d77e076ee5a0ec9c0d705468beb3e9f4 | Java | 823 | 25 | package io.ray.runtime.util;
import java.io.Serializable;
import java.lang.invoke.SerializedLambda;
import java.lang.reflect.Method;
/** see http://cr.openjdk.java.net/~briangoetz/lambda/lambda-translation.html. */
public final class LambdaUtils {
private LambdaUtils() {}
public static SerializedLambda getSeria... |
26f5f85adeb9670feb7eb30f3b1a9de6b64a2539e418a2087ff49d7d1173fc2d | Java | 824 | 40 | /*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package Orion_Stardist;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.OutputStream;
import java.io.... |
570eeec01d9bfe24ddfb9440a91dbdb533c75de3409c9d0c896ec8af1d24d042 | Java | 824 | 40 | package io.ray.serve.deployment;
import java.io.Serializable;
import org.apache.commons.lang3.StringUtils;
public class DeploymentId implements Serializable {
private static final long serialVersionUID = 3423413558240304854L;
private final String app;
private final String name;
public DeploymentId(String nam... |
9dbd746aac59e537026c7716accb741d5717dc2721efd2ed979e15fdcf8bc512 | Java | 836 | 28 | package io.ray.api;
/**
* A handle to a Java actor.
*
* <p>A handle can be used to invoke a remote actor method, with the {@code "call"} method. For
* example:
*
* <pre>{@code
* class MyActor {
* public int echo(int x) {
* return x;
* }
* }
* // Create an actor, and get a handle.
* ActorHandle<MyA... |
91560b041c05cd832cfec09fa2db813f614101eee5352e08c528d01bf413ca4d | Java | 838 | 31 | package io.ray.runtime.actor;
import com.google.common.base.Preconditions;
import io.ray.api.CppActorHandle;
import io.ray.runtime.generated.Common.Language;
import java.io.IOException;
import java.io.ObjectInput;
/** Cpp actor handle implementation for cluster mode. */
public class NativeCppActorHandle extends Nativ... |
0469ceecd7d08b97fd89f8f41318c185360bc834006e8c2840abf49c173c5957 | Java | 840 | 35 | package io.ray.api.concurrencygroup;
import io.ray.api.Ray;
import io.ray.api.function.RayFunc;
import java.util.ArrayList;
import java.util.List;
public class ConcurrencyGroupBuilder<A> extends BaseConcurrencyGroupBuilder<A> {
private String name;
private int maxConcurrency;
private List<RayFunc> funcs = ne... |
f2614d7e8a6c4c0c3dd7503e666e4c80f7c83c134b07ed9e09158cd1c56a7f3c | Java | 855 | 30 | package io.ray.serve.docdemo;
import io.ray.serve.api.Serve;
import io.ray.serve.deployment.Application;
import io.ray.serve.generated.DeploymentLanguage;
import io.ray.serve.handle.DeploymentHandle;
import java.io.File;
public class ManagePythonDeployment {
public static void main(String[] args) {
System.set... |
867eaecc11fdb6fc4d9fda3cdebc89ec7bc49c6dee4757c002e60a8dcf67376a | Java | 878 | 24 | package io.ray.test;
import io.ray.api.PyActorHandle;
import io.ray.api.Ray;
import io.ray.api.function.PyActorClass;
import io.ray.runtime.object.NativeRayObject;
import io.ray.runtime.object.ObjectSerializer;
import org.testng.Assert;
import org.testng.annotations.Test;
@Test(groups = {"cluster"})
public class RayS... |
67061b0df5ec059488c448bfc0a4563dc8586bce64f5cd263bd13dcdd26ef8f9 | Java | 879 | 28 | package io.ray.serve.docdemo;
// docs-strategy-calc-start
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public class StrategyCalc {
public static void main(String[] args) {
long time = System.currentTimeMillis();
String bank1 = "demo_bank_1";
String ban... |
3635029f687831ecd89d102602087de0f2fa9756e2023309241c02dd2326d582 | Java | 881 | 30 | package io.ray.api.exception;
import io.ray.api.id.ObjectId;
/**
* Indicates that an object is lost (either evicted or explicitly deleted) and cannot be restarted.
*
* <p>Note, this exception only happens for actor objects. If actor's current state is after
* object's creating task, the actor cannot re-run the ta... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.