[Java] Replace binary rewrite with Remote Lambda Cache (SerdeLambda) (#2245)

* <feature> : serde lambda

* <feature>:fixed CR

with issue #2245

* <feature>: fixed CR
This commit is contained in:
mylinyuzhi
2018-06-14 03:58:07 +08:00
committed by Philipp Moritz
parent 62de86ff7a
commit fa0ade2bc5
89 changed files with 2633 additions and 7668 deletions
@@ -103,13 +103,6 @@ public final class Ray extends Rpc {
return impl;
}
/**
* whether to use remote lambda.
*/
public static boolean isRemoteLambda() {
return impl.isRemoteLambda();
}
/**
* for ray's app's log.
*/
@@ -10,7 +10,7 @@ import org.ray.util.Sha1Digestor;
* Ray actor abstraction.
*/
public class RayActor<T> extends RayObject<T> implements Externalizable {
public static final RayActor<?> nil = new RayActor<>(UniqueID.nil, UniqueID.nil);
private static final long serialVersionUID = 1877485807405645036L;
private int taskCounter = 0;
@@ -84,4 +84,4 @@ public class RayActor<T> extends RayObject<T> implements Externalizable {
this.actorHandleId = (UniqueID) in.readObject();
this.taskCursor = (UniqueID) in.readObject();
}
}
}
+11 -19
View File
@@ -3,7 +3,7 @@ package org.ray.api;
import java.io.Serializable;
import java.util.Collection;
import java.util.List;
import org.ray.api.internal.Callable;
import org.ray.api.internal.RayFunc;
import org.ray.util.exception.TaskExecutionException;
/**
@@ -54,14 +54,13 @@ public interface RayApi {
* submit a new task by invoking a remote function.
*
* @param taskId nil
* @param funcRun the target running function with @RayRemote
* @param funcCls the target running function's class
* @param lambda the target running function
* @param returnCount the number of to-be-returned objects from funcRun
* @param args arguments to this funcRun, can be its original form or RayObject
* @return a set of ray objects with their return ids
*/
RayObjects call(UniqueID taskId, Callable funcRun, int returnCount, Object... args);
RayObjects call(UniqueID taskId, Class<?> funcCls, Serializable lambda, int returnCount,
RayObjects call(UniqueID taskId, Class<?> funcCls, RayFunc lambda, int returnCount,
Object... args);
/**
@@ -71,34 +70,27 @@ public interface RayApi {
* outputs with a set of labels (usually with Integer or String).
*
* @param taskId nil
* @param funcRun the target running function with @RayRemote
* @param returnIds a set of labels to be used by the returned objects
* @param funcCls the target running function's class
* @param lambda the target running function
* @param returnids a set of labels to be used by the returned objects
* @param args arguments to this funcRun, can be its original form or
* RayObject<original-type>
* @return a set of ray objects with their labels and return ids
*/
<R, RIDT> RayMap<RIDT, R> callWithReturnLabels(UniqueID taskId, Callable funcRun,
Collection<RIDT> returnIds, Object... args);
<R, RIDT> RayMap<RIDT, R> callWithReturnLabels(UniqueID taskId, Class<?> funcCls,
Serializable lambda, Collection<RIDT> returnids,
Object... args);
RayFunc lambda, Collection<RIDT> returnids, Object... args);
/**
* a special case for the above RID-based labeling as <0...returnCount - 1>.
*
* @param taskId nil
* @param funcRun the target running function with @RayRemote
* @param funcCls the target running function's class
* @param lambda the target running function
* @param returnCount the number of to-be-returned objects from funcRun
* @param args arguments to this funcRun, can be its original form or
* RayObject<original-type>
* @return an array of returned objects with their Unique ids
*/
<R> RayList<R> callWithReturnIndices(UniqueID taskId, Callable funcRun, Integer returnCount,
Object... args);
<R> RayList<R> callWithReturnIndices(UniqueID taskId, Class<?> funcCls, Serializable lambda,
<R> RayList<R> callWithReturnIndices(UniqueID taskId, Class<?> funcCls, RayFunc lambda,
Integer returnCount, Object... args);
boolean isRemoteLambda();
}
File diff suppressed because it is too large Load Diff
@@ -6,14 +6,6 @@ import org.ray.api.internal.RayFunc;
@FunctionalInterface
public interface RayFunc_0_1<R0> extends RayFunc {
static <R0> R0 execute(Object[] args) throws Throwable {
String name = (String) args[args.length - 2];
assert (name.equals(RayFunc_0_1.class.getName()));
byte[] funcBytes = (byte[]) args[args.length - 1];
RayFunc_0_1<R0> f = SerializationUtils.deserialize(funcBytes);
return f.apply();
}
R0 apply() throws Throwable;
}
@@ -7,14 +7,6 @@ import org.ray.api.returns.MultipleReturns2;
@FunctionalInterface
public interface RayFunc_0_2<R0, R1> extends RayFunc {
static <R0, R1> MultipleReturns2<R0, R1> execute(Object[] args) throws Throwable {
String name = (String) args[args.length - 2];
assert (name.equals(RayFunc_0_2.class.getName()));
byte[] funcBytes = (byte[]) args[args.length - 1];
RayFunc_0_2<R0, R1> f = SerializationUtils.deserialize(funcBytes);
return f.apply();
}
MultipleReturns2<R0, R1> apply() throws Throwable;
}
@@ -7,14 +7,6 @@ import org.ray.api.returns.MultipleReturns3;
@FunctionalInterface
public interface RayFunc_0_3<R0, R1, R2> extends RayFunc {
static <R0, R1, R2> MultipleReturns3<R0, R1, R2> execute(Object[] args) throws Throwable {
String name = (String) args[args.length - 2];
assert (name.equals(RayFunc_0_3.class.getName()));
byte[] funcBytes = (byte[]) args[args.length - 1];
RayFunc_0_3<R0, R1, R2> f = SerializationUtils.deserialize(funcBytes);
return f.apply();
}
MultipleReturns3<R0, R1, R2> apply() throws Throwable;
}
@@ -7,14 +7,6 @@ import org.ray.api.returns.MultipleReturns4;
@FunctionalInterface
public interface RayFunc_0_4<R0, R1, R2, R3> extends RayFunc {
static <R0, R1, R2, R3> MultipleReturns4<R0, R1, R2, R3> execute(Object[] args) throws Throwable {
String name = (String) args[args.length - 2];
assert (name.equals(RayFunc_0_4.class.getName()));
byte[] funcBytes = (byte[]) args[args.length - 1];
RayFunc_0_4<R0, R1, R2, R3> f = SerializationUtils.deserialize(funcBytes);
return f.apply();
}
MultipleReturns4<R0, R1, R2, R3> apply() throws Throwable;
}
@@ -8,14 +8,6 @@ import org.ray.api.internal.RayFunc;
@FunctionalInterface
public interface RayFunc_0_n<R, RIDT> extends RayFunc {
static <R, RIDT> Map<RIDT, R> execute(Object[] args) throws Throwable {
String name = (String) args[args.length - 2];
assert (name.equals(RayFunc_0_n.class.getName()));
byte[] funcBytes = (byte[]) args[args.length - 1];
RayFunc_0_n<R, RIDT> f = SerializationUtils.deserialize(funcBytes);
return f.apply((Collection<RIDT>) args[0]);
}
Map<RIDT, R> apply(Collection<RIDT> returnids) throws Throwable;
}
@@ -7,14 +7,6 @@ import org.ray.api.internal.RayFunc;
@FunctionalInterface
public interface RayFunc_0_n_list<R> extends RayFunc {
static <R> List<R> execute(Object[] args) throws Throwable {
String name = (String) args[args.length - 2];
assert (name.equals(RayFunc_0_n_list.class.getName()));
byte[] funcBytes = (byte[]) args[args.length - 1];
RayFunc_0_n_list<R> f = SerializationUtils.deserialize(funcBytes);
return f.apply();
}
List<R> apply() throws Throwable;
}
@@ -6,14 +6,6 @@ import org.ray.api.internal.RayFunc;
@FunctionalInterface
public interface RayFunc_1_1<T0, R0> extends RayFunc {
static <T0, R0> R0 execute(Object[] args) throws Throwable {
String name = (String) args[args.length - 2];
assert (name.equals(RayFunc_1_1.class.getName()));
byte[] funcBytes = (byte[]) args[args.length - 1];
RayFunc_1_1<T0, R0> f = SerializationUtils.deserialize(funcBytes);
return f.apply((T0) args[0]);
}
R0 apply(T0 t0) throws Throwable;
}
@@ -7,14 +7,6 @@ import org.ray.api.returns.MultipleReturns2;
@FunctionalInterface
public interface RayFunc_1_2<T0, R0, R1> extends RayFunc {
static <T0, R0, R1> MultipleReturns2<R0, R1> execute(Object[] args) throws Throwable {
String name = (String) args[args.length - 2];
assert (name.equals(RayFunc_1_2.class.getName()));
byte[] funcBytes = (byte[]) args[args.length - 1];
RayFunc_1_2<T0, R0, R1> f = SerializationUtils.deserialize(funcBytes);
return f.apply((T0) args[0]);
}
MultipleReturns2<R0, R1> apply(T0 t0) throws Throwable;
}
@@ -7,14 +7,6 @@ import org.ray.api.returns.MultipleReturns3;
@FunctionalInterface
public interface RayFunc_1_3<T0, R0, R1, R2> extends RayFunc {
static <T0, R0, R1, R2> MultipleReturns3<R0, R1, R2> execute(Object[] args) throws Throwable {
String name = (String) args[args.length - 2];
assert (name.equals(RayFunc_1_3.class.getName()));
byte[] funcBytes = (byte[]) args[args.length - 1];
RayFunc_1_3<T0, R0, R1, R2> f = SerializationUtils.deserialize(funcBytes);
return f.apply((T0) args[0]);
}
MultipleReturns3<R0, R1, R2> apply(T0 t0) throws Throwable;
}
@@ -7,15 +7,6 @@ import org.ray.api.returns.MultipleReturns4;
@FunctionalInterface
public interface RayFunc_1_4<T0, R0, R1, R2, R3> extends RayFunc {
static <T0, R0, R1, R2, R3> MultipleReturns4<R0, R1, R2, R3> execute(Object[] args)
throws Throwable {
String name = (String) args[args.length - 2];
assert (name.equals(RayFunc_1_4.class.getName()));
byte[] funcBytes = (byte[]) args[args.length - 1];
RayFunc_1_4<T0, R0, R1, R2, R3> f = SerializationUtils.deserialize(funcBytes);
return f.apply((T0) args[0]);
}
MultipleReturns4<R0, R1, R2, R3> apply(T0 t0) throws Throwable;
}
@@ -8,14 +8,6 @@ import org.ray.api.internal.RayFunc;
@FunctionalInterface
public interface RayFunc_1_n<T0, R, RIDT> extends RayFunc {
static <T0, R, RIDT> Map<RIDT, R> execute(Object[] args) throws Throwable {
String name = (String) args[args.length - 2];
assert (name.equals(RayFunc_1_n.class.getName()));
byte[] funcBytes = (byte[]) args[args.length - 1];
RayFunc_1_n<T0, R, RIDT> f = SerializationUtils.deserialize(funcBytes);
return f.apply((Collection<RIDT>) args[0], (T0) args[1]);
}
Map<RIDT, R> apply(Collection<RIDT> returnids, T0 t0) throws Throwable;
}
@@ -7,14 +7,6 @@ import org.ray.api.internal.RayFunc;
@FunctionalInterface
public interface RayFunc_1_n_list<T0, R> extends RayFunc {
static <T0, R> List<R> execute(Object[] args) throws Throwable {
String name = (String) args[args.length - 2];
assert (name.equals(RayFunc_1_n_list.class.getName()));
byte[] funcBytes = (byte[]) args[args.length - 1];
RayFunc_1_n_list<T0, R> f = SerializationUtils.deserialize(funcBytes);
return f.apply((T0) args[0]);
}
List<R> apply(T0 t0) throws Throwable;
}
@@ -6,14 +6,6 @@ import org.ray.api.internal.RayFunc;
@FunctionalInterface
public interface RayFunc_2_1<T0, T1, R0> extends RayFunc {
static <T0, T1, R0> R0 execute(Object[] args) throws Throwable {
String name = (String) args[args.length - 2];
assert (name.equals(RayFunc_2_1.class.getName()));
byte[] funcBytes = (byte[]) args[args.length - 1];
RayFunc_2_1<T0, T1, R0> f = SerializationUtils.deserialize(funcBytes);
return f.apply((T0) args[0], (T1) args[1]);
}
R0 apply(T0 t0, T1 t1) throws Throwable;
}
@@ -7,14 +7,6 @@ import org.ray.api.returns.MultipleReturns2;
@FunctionalInterface
public interface RayFunc_2_2<T0, T1, R0, R1> extends RayFunc {
static <T0, T1, R0, R1> MultipleReturns2<R0, R1> execute(Object[] args) throws Throwable {
String name = (String) args[args.length - 2];
assert (name.equals(RayFunc_2_2.class.getName()));
byte[] funcBytes = (byte[]) args[args.length - 1];
RayFunc_2_2<T0, T1, R0, R1> f = SerializationUtils.deserialize(funcBytes);
return f.apply((T0) args[0], (T1) args[1]);
}
MultipleReturns2<R0, R1> apply(T0 t0, T1 t1) throws Throwable;
}
@@ -7,14 +7,6 @@ import org.ray.api.returns.MultipleReturns3;
@FunctionalInterface
public interface RayFunc_2_3<T0, T1, R0, R1, R2> extends RayFunc {
static <T0, T1, R0, R1, R2> MultipleReturns3<R0, R1, R2> execute(Object[] args) throws Throwable {
String name = (String) args[args.length - 2];
assert (name.equals(RayFunc_2_3.class.getName()));
byte[] funcBytes = (byte[]) args[args.length - 1];
RayFunc_2_3<T0, T1, R0, R1, R2> f = SerializationUtils.deserialize(funcBytes);
return f.apply((T0) args[0], (T1) args[1]);
}
MultipleReturns3<R0, R1, R2> apply(T0 t0, T1 t1) throws Throwable;
}
@@ -7,15 +7,6 @@ import org.ray.api.returns.MultipleReturns4;
@FunctionalInterface
public interface RayFunc_2_4<T0, T1, R0, R1, R2, R3> extends RayFunc {
static <T0, T1, R0, R1, R2, R3> MultipleReturns4<R0, R1, R2, R3> execute(Object[] args)
throws Throwable {
String name = (String) args[args.length - 2];
assert (name.equals(RayFunc_2_4.class.getName()));
byte[] funcBytes = (byte[]) args[args.length - 1];
RayFunc_2_4<T0, T1, R0, R1, R2, R3> f = SerializationUtils.deserialize(funcBytes);
return f.apply((T0) args[0], (T1) args[1]);
}
MultipleReturns4<R0, R1, R2, R3> apply(T0 t0, T1 t1) throws Throwable;
}
@@ -8,14 +8,6 @@ import org.ray.api.internal.RayFunc;
@FunctionalInterface
public interface RayFunc_2_n<T0, T1, R, RIDT> extends RayFunc {
static <T0, T1, R, RIDT> Map<RIDT, R> execute(Object[] args) throws Throwable {
String name = (String) args[args.length - 2];
assert (name.equals(RayFunc_2_n.class.getName()));
byte[] funcBytes = (byte[]) args[args.length - 1];
RayFunc_2_n<T0, T1, R, RIDT> f = SerializationUtils.deserialize(funcBytes);
return f.apply((Collection<RIDT>) args[0], (T0) args[1], (T1) args[2]);
}
Map<RIDT, R> apply(Collection<RIDT> returnids, T0 t0, T1 t1) throws Throwable;
}
@@ -7,14 +7,6 @@ import org.ray.api.internal.RayFunc;
@FunctionalInterface
public interface RayFunc_2_n_list<T0, T1, R> extends RayFunc {
static <T0, T1, R> List<R> execute(Object[] args) throws Throwable {
String name = (String) args[args.length - 2];
assert (name.equals(RayFunc_2_n_list.class.getName()));
byte[] funcBytes = (byte[]) args[args.length - 1];
RayFunc_2_n_list<T0, T1, R> f = SerializationUtils.deserialize(funcBytes);
return f.apply((T0) args[0], (T1) args[1]);
}
List<R> apply(T0 t0, T1 t1) throws Throwable;
}
@@ -6,14 +6,6 @@ import org.ray.api.internal.RayFunc;
@FunctionalInterface
public interface RayFunc_3_1<T0, T1, T2, R0> extends RayFunc {
static <T0, T1, T2, R0> R0 execute(Object[] args) throws Throwable {
String name = (String) args[args.length - 2];
assert (name.equals(RayFunc_3_1.class.getName()));
byte[] funcBytes = (byte[]) args[args.length - 1];
RayFunc_3_1<T0, T1, T2, R0> f = SerializationUtils.deserialize(funcBytes);
return f.apply((T0) args[0], (T1) args[1], (T2) args[2]);
}
R0 apply(T0 t0, T1 t1, T2 t2) throws Throwable;
}
@@ -7,14 +7,6 @@ import org.ray.api.returns.MultipleReturns2;
@FunctionalInterface
public interface RayFunc_3_2<T0, T1, T2, R0, R1> extends RayFunc {
static <T0, T1, T2, R0, R1> MultipleReturns2<R0, R1> execute(Object[] args) throws Throwable {
String name = (String) args[args.length - 2];
assert (name.equals(RayFunc_3_2.class.getName()));
byte[] funcBytes = (byte[]) args[args.length - 1];
RayFunc_3_2<T0, T1, T2, R0, R1> f = SerializationUtils.deserialize(funcBytes);
return f.apply((T0) args[0], (T1) args[1], (T2) args[2]);
}
MultipleReturns2<R0, R1> apply(T0 t0, T1 t1, T2 t2) throws Throwable;
}
@@ -7,15 +7,6 @@ import org.ray.api.returns.MultipleReturns3;
@FunctionalInterface
public interface RayFunc_3_3<T0, T1, T2, R0, R1, R2> extends RayFunc {
static <T0, T1, T2, R0, R1, R2> MultipleReturns3<R0, R1, R2> execute(Object[] args)
throws Throwable {
String name = (String) args[args.length - 2];
assert (name.equals(RayFunc_3_3.class.getName()));
byte[] funcBytes = (byte[]) args[args.length - 1];
RayFunc_3_3<T0, T1, T2, R0, R1, R2> f = SerializationUtils.deserialize(funcBytes);
return f.apply((T0) args[0], (T1) args[1], (T2) args[2]);
}
MultipleReturns3<R0, R1, R2> apply(T0 t0, T1 t1, T2 t2) throws Throwable;
}
@@ -7,15 +7,6 @@ import org.ray.api.returns.MultipleReturns4;
@FunctionalInterface
public interface RayFunc_3_4<T0, T1, T2, R0, R1, R2, R3> extends RayFunc {
static <T0, T1, T2, R0, R1, R2, R3> MultipleReturns4<R0, R1, R2, R3> execute(Object[] args)
throws Throwable {
String name = (String) args[args.length - 2];
assert (name.equals(RayFunc_3_4.class.getName()));
byte[] funcBytes = (byte[]) args[args.length - 1];
RayFunc_3_4<T0, T1, T2, R0, R1, R2, R3> f = SerializationUtils.deserialize(funcBytes);
return f.apply((T0) args[0], (T1) args[1], (T2) args[2]);
}
MultipleReturns4<R0, R1, R2, R3> apply(T0 t0, T1 t1, T2 t2) throws Throwable;
}
@@ -8,14 +8,6 @@ import org.ray.api.internal.RayFunc;
@FunctionalInterface
public interface RayFunc_3_n<T0, T1, T2, R, RIDT> extends RayFunc {
static <T0, T1, T2, R, RIDT> Map<RIDT, R> execute(Object[] args) throws Throwable {
String name = (String) args[args.length - 2];
assert (name.equals(RayFunc_3_n.class.getName()));
byte[] funcBytes = (byte[]) args[args.length - 1];
RayFunc_3_n<T0, T1, T2, R, RIDT> f = SerializationUtils.deserialize(funcBytes);
return f.apply((Collection<RIDT>) args[0], (T0) args[1], (T1) args[2], (T2) args[3]);
}
Map<RIDT, R> apply(Collection<RIDT> returnids, T0 t0, T1 t1, T2 t2) throws Throwable;
}
@@ -7,14 +7,6 @@ import org.ray.api.internal.RayFunc;
@FunctionalInterface
public interface RayFunc_3_n_list<T0, T1, T2, R> extends RayFunc {
static <T0, T1, T2, R> List<R> execute(Object[] args) throws Throwable {
String name = (String) args[args.length - 2];
assert (name.equals(RayFunc_3_n_list.class.getName()));
byte[] funcBytes = (byte[]) args[args.length - 1];
RayFunc_3_n_list<T0, T1, T2, R> f = SerializationUtils.deserialize(funcBytes);
return f.apply((T0) args[0], (T1) args[1], (T2) args[2]);
}
List<R> apply(T0 t0, T1 t1, T2 t2) throws Throwable;
}
@@ -6,14 +6,6 @@ import org.ray.api.internal.RayFunc;
@FunctionalInterface
public interface RayFunc_4_1<T0, T1, T2, T3, R0> extends RayFunc {
static <T0, T1, T2, T3, R0> R0 execute(Object[] args) throws Throwable {
String name = (String) args[args.length - 2];
assert (name.equals(RayFunc_4_1.class.getName()));
byte[] funcBytes = (byte[]) args[args.length - 1];
RayFunc_4_1<T0, T1, T2, T3, R0> f = SerializationUtils.deserialize(funcBytes);
return f.apply((T0) args[0], (T1) args[1], (T2) args[2], (T3) args[3]);
}
R0 apply(T0 t0, T1 t1, T2 t2, T3 t3) throws Throwable;
}
@@ -7,14 +7,6 @@ import org.ray.api.returns.MultipleReturns2;
@FunctionalInterface
public interface RayFunc_4_2<T0, T1, T2, T3, R0, R1> extends RayFunc {
static <T0, T1, T2, T3, R0, R1> MultipleReturns2<R0, R1> execute(Object[] args) throws Throwable {
String name = (String) args[args.length - 2];
assert (name.equals(RayFunc_4_2.class.getName()));
byte[] funcBytes = (byte[]) args[args.length - 1];
RayFunc_4_2<T0, T1, T2, T3, R0, R1> f = SerializationUtils.deserialize(funcBytes);
return f.apply((T0) args[0], (T1) args[1], (T2) args[2], (T3) args[3]);
}
MultipleReturns2<R0, R1> apply(T0 t0, T1 t1, T2 t2, T3 t3) throws Throwable;
}
@@ -7,15 +7,6 @@ import org.ray.api.returns.MultipleReturns3;
@FunctionalInterface
public interface RayFunc_4_3<T0, T1, T2, T3, R0, R1, R2> extends RayFunc {
static <T0, T1, T2, T3, R0, R1, R2> MultipleReturns3<R0, R1, R2> execute(Object[] args)
throws Throwable {
String name = (String) args[args.length - 2];
assert (name.equals(RayFunc_4_3.class.getName()));
byte[] funcBytes = (byte[]) args[args.length - 1];
RayFunc_4_3<T0, T1, T2, T3, R0, R1, R2> f = SerializationUtils.deserialize(funcBytes);
return f.apply((T0) args[0], (T1) args[1], (T2) args[2], (T3) args[3]);
}
MultipleReturns3<R0, R1, R2> apply(T0 t0, T1 t1, T2 t2, T3 t3) throws Throwable;
}
@@ -7,15 +7,6 @@ import org.ray.api.returns.MultipleReturns4;
@FunctionalInterface
public interface RayFunc_4_4<T0, T1, T2, T3, R0, R1, R2, R3> extends RayFunc {
static <T0, T1, T2, T3, R0, R1, R2, R3> MultipleReturns4<R0, R1, R2, R3> execute(Object[] args)
throws Throwable {
String name = (String) args[args.length - 2];
assert (name.equals(RayFunc_4_4.class.getName()));
byte[] funcBytes = (byte[]) args[args.length - 1];
RayFunc_4_4<T0, T1, T2, T3, R0, R1, R2, R3> f = SerializationUtils.deserialize(funcBytes);
return f.apply((T0) args[0], (T1) args[1], (T2) args[2], (T3) args[3]);
}
MultipleReturns4<R0, R1, R2, R3> apply(T0 t0, T1 t1, T2 t2, T3 t3) throws Throwable;
}
@@ -8,15 +8,6 @@ import org.ray.api.internal.RayFunc;
@FunctionalInterface
public interface RayFunc_4_n<T0, T1, T2, T3, R, RIDT> extends RayFunc {
static <T0, T1, T2, T3, R, RIDT> Map<RIDT, R> execute(Object[] args) throws Throwable {
String name = (String) args[args.length - 2];
assert (name.equals(RayFunc_4_n.class.getName()));
byte[] funcBytes = (byte[]) args[args.length - 1];
RayFunc_4_n<T0, T1, T2, T3, R, RIDT> f = SerializationUtils.deserialize(funcBytes);
return f
.apply((Collection<RIDT>) args[0], (T0) args[1], (T1) args[2], (T2) args[3], (T3) args[4]);
}
Map<RIDT, R> apply(Collection<RIDT> returnids, T0 t0, T1 t1, T2 t2, T3 t3) throws Throwable;
}
@@ -7,14 +7,6 @@ import org.ray.api.internal.RayFunc;
@FunctionalInterface
public interface RayFunc_4_n_list<T0, T1, T2, T3, R> extends RayFunc {
static <T0, T1, T2, T3, R> List<R> execute(Object[] args) throws Throwable {
String name = (String) args[args.length - 2];
assert (name.equals(RayFunc_4_n_list.class.getName()));
byte[] funcBytes = (byte[]) args[args.length - 1];
RayFunc_4_n_list<T0, T1, T2, T3, R> f = SerializationUtils.deserialize(funcBytes);
return f.apply((T0) args[0], (T1) args[1], (T2) args[2], (T3) args[3]);
}
List<R> apply(T0 t0, T1 t1, T2 t2, T3 t3) throws Throwable;
}
@@ -6,14 +6,6 @@ import org.ray.api.internal.RayFunc;
@FunctionalInterface
public interface RayFunc_5_1<T0, T1, T2, T3, T4, R0> extends RayFunc {
static <T0, T1, T2, T3, T4, R0> R0 execute(Object[] args) throws Throwable {
String name = (String) args[args.length - 2];
assert (name.equals(RayFunc_5_1.class.getName()));
byte[] funcBytes = (byte[]) args[args.length - 1];
RayFunc_5_1<T0, T1, T2, T3, T4, R0> f = SerializationUtils.deserialize(funcBytes);
return f.apply((T0) args[0], (T1) args[1], (T2) args[2], (T3) args[3], (T4) args[4]);
}
R0 apply(T0 t0, T1 t1, T2 t2, T3 t3, T4 t4) throws Throwable;
}
@@ -7,15 +7,6 @@ import org.ray.api.returns.MultipleReturns2;
@FunctionalInterface
public interface RayFunc_5_2<T0, T1, T2, T3, T4, R0, R1> extends RayFunc {
static <T0, T1, T2, T3, T4, R0, R1> MultipleReturns2<R0, R1> execute(Object[] args)
throws Throwable {
String name = (String) args[args.length - 2];
assert (name.equals(RayFunc_5_2.class.getName()));
byte[] funcBytes = (byte[]) args[args.length - 1];
RayFunc_5_2<T0, T1, T2, T3, T4, R0, R1> f = SerializationUtils.deserialize(funcBytes);
return f.apply((T0) args[0], (T1) args[1], (T2) args[2], (T3) args[3], (T4) args[4]);
}
MultipleReturns2<R0, R1> apply(T0 t0, T1 t1, T2 t2, T3 t3, T4 t4) throws Throwable;
}
@@ -7,15 +7,6 @@ import org.ray.api.returns.MultipleReturns3;
@FunctionalInterface
public interface RayFunc_5_3<T0, T1, T2, T3, T4, R0, R1, R2> extends RayFunc {
static <T0, T1, T2, T3, T4, R0, R1, R2> MultipleReturns3<R0, R1, R2> execute(Object[] args)
throws Throwable {
String name = (String) args[args.length - 2];
assert (name.equals(RayFunc_5_3.class.getName()));
byte[] funcBytes = (byte[]) args[args.length - 1];
RayFunc_5_3<T0, T1, T2, T3, T4, R0, R1, R2> f = SerializationUtils.deserialize(funcBytes);
return f.apply((T0) args[0], (T1) args[1], (T2) args[2], (T3) args[3], (T4) args[4]);
}
MultipleReturns3<R0, R1, R2> apply(T0 t0, T1 t1, T2 t2, T3 t3, T4 t4) throws Throwable;
}
@@ -7,15 +7,6 @@ import org.ray.api.returns.MultipleReturns4;
@FunctionalInterface
public interface RayFunc_5_4<T0, T1, T2, T3, T4, R0, R1, R2, R3> extends RayFunc {
static <T0, T1, T2, T3, T4, R0, R1, R2, R3> MultipleReturns4<R0, R1, R2, R3> execute(
Object[] args) throws Throwable {
String name = (String) args[args.length - 2];
assert (name.equals(RayFunc_5_4.class.getName()));
byte[] funcBytes = (byte[]) args[args.length - 1];
RayFunc_5_4<T0, T1, T2, T3, T4, R0, R1, R2, R3> f = SerializationUtils.deserialize(funcBytes);
return f.apply((T0) args[0], (T1) args[1], (T2) args[2], (T3) args[3], (T4) args[4]);
}
MultipleReturns4<R0, R1, R2, R3> apply(T0 t0, T1 t1, T2 t2, T3 t3, T4 t4) throws Throwable;
}
@@ -8,16 +8,6 @@ import org.ray.api.internal.RayFunc;
@FunctionalInterface
public interface RayFunc_5_n<T0, T1, T2, T3, T4, R, RIDT> extends RayFunc {
static <T0, T1, T2, T3, T4, R, RIDT> Map<RIDT, R> execute(Object[] args) throws Throwable {
String name = (String) args[args.length - 2];
assert (name.equals(RayFunc_5_n.class.getName()));
byte[] funcBytes = (byte[]) args[args.length - 1];
RayFunc_5_n<T0, T1, T2, T3, T4, R, RIDT> f = SerializationUtils.deserialize(funcBytes);
return f
.apply((Collection<RIDT>) args[0], (T0) args[1], (T1) args[2], (T2) args[3], (T3) args[4],
(T4) args[5]);
}
Map<RIDT, R> apply(Collection<RIDT> returnids, T0 t0, T1 t1, T2 t2, T3 t3, T4 t4)
throws Throwable;
@@ -7,14 +7,6 @@ import org.ray.api.internal.RayFunc;
@FunctionalInterface
public interface RayFunc_5_n_list<T0, T1, T2, T3, T4, R> extends RayFunc {
static <T0, T1, T2, T3, T4, R> List<R> execute(Object[] args) throws Throwable {
String name = (String) args[args.length - 2];
assert (name.equals(RayFunc_5_n_list.class.getName()));
byte[] funcBytes = (byte[]) args[args.length - 1];
RayFunc_5_n_list<T0, T1, T2, T3, T4, R> f = SerializationUtils.deserialize(funcBytes);
return f.apply((T0) args[0], (T1) args[1], (T2) args[2], (T3) args[3], (T4) args[4]);
}
List<R> apply(T0 t0, T1 t1, T2 t2, T3 t3, T4 t4) throws Throwable;
}
@@ -6,15 +6,6 @@ import org.ray.api.internal.RayFunc;
@FunctionalInterface
public interface RayFunc_6_1<T0, T1, T2, T3, T4, T5, R0> extends RayFunc {
static <T0, T1, T2, T3, T4, T5, R0> R0 execute(Object[] args) throws Throwable {
String name = (String) args[args.length - 2];
assert (name.equals(RayFunc_6_1.class.getName()));
byte[] funcBytes = (byte[]) args[args.length - 1];
RayFunc_6_1<T0, T1, T2, T3, T4, T5, R0> f = SerializationUtils.deserialize(funcBytes);
return f
.apply((T0) args[0], (T1) args[1], (T2) args[2], (T3) args[3], (T4) args[4], (T5) args[5]);
}
R0 apply(T0 t0, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5) throws Throwable;
}
@@ -7,16 +7,6 @@ import org.ray.api.returns.MultipleReturns2;
@FunctionalInterface
public interface RayFunc_6_2<T0, T1, T2, T3, T4, T5, R0, R1> extends RayFunc {
static <T0, T1, T2, T3, T4, T5, R0, R1> MultipleReturns2<R0, R1> execute(Object[] args)
throws Throwable {
String name = (String) args[args.length - 2];
assert (name.equals(RayFunc_6_2.class.getName()));
byte[] funcBytes = (byte[]) args[args.length - 1];
RayFunc_6_2<T0, T1, T2, T3, T4, T5, R0, R1> f = SerializationUtils.deserialize(funcBytes);
return f
.apply((T0) args[0], (T1) args[1], (T2) args[2], (T3) args[3], (T4) args[4], (T5) args[5]);
}
MultipleReturns2<R0, R1> apply(T0 t0, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5) throws Throwable;
}
@@ -7,16 +7,6 @@ import org.ray.api.returns.MultipleReturns3;
@FunctionalInterface
public interface RayFunc_6_3<T0, T1, T2, T3, T4, T5, R0, R1, R2> extends RayFunc {
static <T0, T1, T2, T3, T4, T5, R0, R1, R2> MultipleReturns3<R0, R1, R2> execute(Object[] args)
throws Throwable {
String name = (String) args[args.length - 2];
assert (name.equals(RayFunc_6_3.class.getName()));
byte[] funcBytes = (byte[]) args[args.length - 1];
RayFunc_6_3<T0, T1, T2, T3, T4, T5, R0, R1, R2> f = SerializationUtils.deserialize(funcBytes);
return f
.apply((T0) args[0], (T1) args[1], (T2) args[2], (T3) args[3], (T4) args[4], (T5) args[5]);
}
MultipleReturns3<R0, R1, R2> apply(T0 t0, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5) throws Throwable;
}
@@ -7,17 +7,6 @@ import org.ray.api.returns.MultipleReturns4;
@FunctionalInterface
public interface RayFunc_6_4<T0, T1, T2, T3, T4, T5, R0, R1, R2, R3> extends RayFunc {
static <T0, T1, T2, T3, T4, T5, R0, R1, R2, R3> MultipleReturns4<R0, R1, R2, R3> execute(
Object[] args) throws Throwable {
String name = (String) args[args.length - 2];
assert (name.equals(RayFunc_6_4.class.getName()));
byte[] funcBytes = (byte[]) args[args.length - 1];
RayFunc_6_4<T0, T1, T2, T3, T4, T5, R0, R1, R2, R3> f = SerializationUtils
.deserialize(funcBytes);
return f
.apply((T0) args[0], (T1) args[1], (T2) args[2], (T3) args[3], (T4) args[4], (T5) args[5]);
}
MultipleReturns4<R0, R1, R2, R3> apply(T0 t0, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5) throws Throwable;
}
@@ -8,16 +8,6 @@ import org.ray.api.internal.RayFunc;
@FunctionalInterface
public interface RayFunc_6_n<T0, T1, T2, T3, T4, T5, R, RIDT> extends RayFunc {
static <T0, T1, T2, T3, T4, T5, R, RIDT> Map<RIDT, R> execute(Object[] args) throws Throwable {
String name = (String) args[args.length - 2];
assert (name.equals(RayFunc_6_n.class.getName()));
byte[] funcBytes = (byte[]) args[args.length - 1];
RayFunc_6_n<T0, T1, T2, T3, T4, T5, R, RIDT> f = SerializationUtils.deserialize(funcBytes);
return f
.apply((Collection<RIDT>) args[0], (T0) args[1], (T1) args[2], (T2) args[3], (T3) args[4],
(T4) args[5], (T5) args[6]);
}
Map<RIDT, R> apply(Collection<RIDT> returnids, T0 t0, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5)
throws Throwable;
@@ -7,15 +7,6 @@ import org.ray.api.internal.RayFunc;
@FunctionalInterface
public interface RayFunc_6_n_list<T0, T1, T2, T3, T4, T5, R> extends RayFunc {
static <T0, T1, T2, T3, T4, T5, R> List<R> execute(Object[] args) throws Throwable {
String name = (String) args[args.length - 2];
assert (name.equals(RayFunc_6_n_list.class.getName()));
byte[] funcBytes = (byte[]) args[args.length - 1];
RayFunc_6_n_list<T0, T1, T2, T3, T4, T5, R> f = SerializationUtils.deserialize(funcBytes);
return f
.apply((T0) args[0], (T1) args[1], (T2) args[2], (T3) args[3], (T4) args[4], (T5) args[5]);
}
List<R> apply(T0 t0, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5) throws Throwable;
}
@@ -1,9 +0,0 @@
package org.ray.api.internal;
/**
* hold the remote call.
*/
public interface Callable {
void run() throws Throwable;
}