diff --git a/common/src/main/java/tachyon/Constants.java b/common/src/main/java/tachyon/Constants.java
index 96f96a87023a..fb127e701e52 100644
--- a/common/src/main/java/tachyon/Constants.java
+++ b/common/src/main/java/tachyon/Constants.java
@@ -78,6 +78,7 @@ public class Constants {
public static final String BLOCK_MASTER_SERVICE_NAME = "BlockMaster";
public static final String FILE_SYSTEM_MASTER_SERVICE_NAME = "FileSystemMaster";
public static final String RAW_TABLE_MASTER_SERVICE_NAME = "RawTableMaster";
+ public static final String LINEAGE_MASTER_SERVICE_NAME = "LineageMaster";
/**
* Version 1 [Before 0.5.0] Customized ser/de based.
diff --git a/common/src/main/java/tachyon/thrift/BlockInfo.java b/common/src/main/java/tachyon/thrift/BlockInfo.java
index 5e6b129ec9f8..7089a34af819 100644
--- a/common/src/main/java/tachyon/thrift/BlockInfo.java
+++ b/common/src/main/java/tachyon/thrift/BlockInfo.java
@@ -34,7 +34,7 @@
import org.slf4j.LoggerFactory;
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-9-12")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-9-15")
public class BlockInfo implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("BlockInfo");
diff --git a/common/src/main/java/tachyon/thrift/BlockInfoException.java b/common/src/main/java/tachyon/thrift/BlockInfoException.java
index f5366020c654..1bb3ab3c1030 100644
--- a/common/src/main/java/tachyon/thrift/BlockInfoException.java
+++ b/common/src/main/java/tachyon/thrift/BlockInfoException.java
@@ -34,7 +34,7 @@
import org.slf4j.LoggerFactory;
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-9-12")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-9-15")
public class BlockInfoException extends TException implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("BlockInfoException");
diff --git a/common/src/main/java/tachyon/thrift/BlockLocation.java b/common/src/main/java/tachyon/thrift/BlockLocation.java
index d6104a60219d..babc1e24fc2a 100644
--- a/common/src/main/java/tachyon/thrift/BlockLocation.java
+++ b/common/src/main/java/tachyon/thrift/BlockLocation.java
@@ -34,7 +34,7 @@
import org.slf4j.LoggerFactory;
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-9-12")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-9-15")
public class BlockLocation implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("BlockLocation");
diff --git a/common/src/main/java/tachyon/thrift/BlockMasterService.java b/common/src/main/java/tachyon/thrift/BlockMasterService.java
index ac427e655fc9..fb89c8e2d469 100644
--- a/common/src/main/java/tachyon/thrift/BlockMasterService.java
+++ b/common/src/main/java/tachyon/thrift/BlockMasterService.java
@@ -34,7 +34,7 @@
import org.slf4j.LoggerFactory;
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-9-12")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-9-15")
public class BlockMasterService {
public interface Iface {
diff --git a/common/src/main/java/tachyon/thrift/Command.java b/common/src/main/java/tachyon/thrift/Command.java
index 2e05c82b5741..8e7746c30a91 100644
--- a/common/src/main/java/tachyon/thrift/Command.java
+++ b/common/src/main/java/tachyon/thrift/Command.java
@@ -34,7 +34,7 @@
import org.slf4j.LoggerFactory;
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-9-12")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-9-15")
public class Command implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("Command");
diff --git a/common/src/main/java/tachyon/thrift/DependencyDoesNotExistException.java b/common/src/main/java/tachyon/thrift/DependencyDoesNotExistException.java
index ff533d0908ab..7ceb298df5aa 100644
--- a/common/src/main/java/tachyon/thrift/DependencyDoesNotExistException.java
+++ b/common/src/main/java/tachyon/thrift/DependencyDoesNotExistException.java
@@ -34,7 +34,7 @@
import org.slf4j.LoggerFactory;
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-9-12")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-9-15")
public class DependencyDoesNotExistException extends TException implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("DependencyDoesNotExistException");
diff --git a/common/src/main/java/tachyon/thrift/DependencyInfo.java b/common/src/main/java/tachyon/thrift/DependencyInfo.java
index f878bd0ff398..e600ddd30280 100644
--- a/common/src/main/java/tachyon/thrift/DependencyInfo.java
+++ b/common/src/main/java/tachyon/thrift/DependencyInfo.java
@@ -34,7 +34,7 @@
import org.slf4j.LoggerFactory;
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-9-12")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-9-15")
public class DependencyInfo implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("DependencyInfo");
diff --git a/common/src/main/java/tachyon/thrift/FailedToCheckpointException.java b/common/src/main/java/tachyon/thrift/FailedToCheckpointException.java
index eeed3c7632eb..5a02d955b47c 100644
--- a/common/src/main/java/tachyon/thrift/FailedToCheckpointException.java
+++ b/common/src/main/java/tachyon/thrift/FailedToCheckpointException.java
@@ -34,7 +34,7 @@
import org.slf4j.LoggerFactory;
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-9-12")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-9-15")
public class FailedToCheckpointException extends TException implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("FailedToCheckpointException");
diff --git a/common/src/main/java/tachyon/thrift/FileAlreadyExistException.java b/common/src/main/java/tachyon/thrift/FileAlreadyExistException.java
index 5e1376198f35..b426df7199cd 100644
--- a/common/src/main/java/tachyon/thrift/FileAlreadyExistException.java
+++ b/common/src/main/java/tachyon/thrift/FileAlreadyExistException.java
@@ -34,7 +34,7 @@
import org.slf4j.LoggerFactory;
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-9-12")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-9-15")
public class FileAlreadyExistException extends TException implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("FileAlreadyExistException");
diff --git a/common/src/main/java/tachyon/thrift/FileBlockInfo.java b/common/src/main/java/tachyon/thrift/FileBlockInfo.java
index 63328572ac7b..f61f38ab9d67 100644
--- a/common/src/main/java/tachyon/thrift/FileBlockInfo.java
+++ b/common/src/main/java/tachyon/thrift/FileBlockInfo.java
@@ -34,7 +34,7 @@
import org.slf4j.LoggerFactory;
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-9-12")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-9-15")
public class FileBlockInfo implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("FileBlockInfo");
diff --git a/common/src/main/java/tachyon/thrift/FileDoesNotExistException.java b/common/src/main/java/tachyon/thrift/FileDoesNotExistException.java
index f5677ea8f510..2e0524c963f6 100644
--- a/common/src/main/java/tachyon/thrift/FileDoesNotExistException.java
+++ b/common/src/main/java/tachyon/thrift/FileDoesNotExistException.java
@@ -34,7 +34,7 @@
import org.slf4j.LoggerFactory;
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-9-12")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-9-15")
public class FileDoesNotExistException extends TException implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("FileDoesNotExistException");
diff --git a/common/src/main/java/tachyon/thrift/FileInfo.java b/common/src/main/java/tachyon/thrift/FileInfo.java
index 38d606475ae3..e5dd9fd57514 100644
--- a/common/src/main/java/tachyon/thrift/FileInfo.java
+++ b/common/src/main/java/tachyon/thrift/FileInfo.java
@@ -34,7 +34,7 @@
import org.slf4j.LoggerFactory;
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-9-12")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-9-15")
public class FileInfo implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("FileInfo");
diff --git a/common/src/main/java/tachyon/thrift/FileSystemMasterService.java b/common/src/main/java/tachyon/thrift/FileSystemMasterService.java
index 978966d8d52f..3086915b1e3f 100644
--- a/common/src/main/java/tachyon/thrift/FileSystemMasterService.java
+++ b/common/src/main/java/tachyon/thrift/FileSystemMasterService.java
@@ -34,7 +34,7 @@
import org.slf4j.LoggerFactory;
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-9-12")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-9-15")
public class FileSystemMasterService {
public interface Iface {
diff --git a/common/src/main/java/tachyon/thrift/InvalidPathException.java b/common/src/main/java/tachyon/thrift/InvalidPathException.java
index 9702510d44be..756933730b92 100644
--- a/common/src/main/java/tachyon/thrift/InvalidPathException.java
+++ b/common/src/main/java/tachyon/thrift/InvalidPathException.java
@@ -34,7 +34,7 @@
import org.slf4j.LoggerFactory;
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-9-12")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-9-15")
public class InvalidPathException extends TException implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("InvalidPathException");
diff --git a/common/src/main/java/tachyon/thrift/LineageMasterService.java b/common/src/main/java/tachyon/thrift/LineageMasterService.java
new file mode 100644
index 000000000000..da1dceb45ada
--- /dev/null
+++ b/common/src/main/java/tachyon/thrift/LineageMasterService.java
@@ -0,0 +1,2156 @@
+/**
+ * Autogenerated by Thrift Compiler (0.9.2)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
+ */
+package tachyon.thrift;
+
+import org.apache.thrift.scheme.IScheme;
+import org.apache.thrift.scheme.SchemeFactory;
+import org.apache.thrift.scheme.StandardScheme;
+
+import org.apache.thrift.scheme.TupleScheme;
+import org.apache.thrift.protocol.TTupleProtocol;
+import org.apache.thrift.protocol.TProtocolException;
+import org.apache.thrift.EncodingUtils;
+import org.apache.thrift.TException;
+import org.apache.thrift.async.AsyncMethodCallback;
+import org.apache.thrift.server.AbstractNonblockingServer.*;
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Map;
+import java.util.HashMap;
+import java.util.EnumMap;
+import java.util.Set;
+import java.util.HashSet;
+import java.util.EnumSet;
+import java.util.Collections;
+import java.util.BitSet;
+import java.nio.ByteBuffer;
+import java.util.Arrays;
+import javax.annotation.Generated;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-9-15")
+public class LineageMasterService {
+
+ public interface Iface {
+
+ public long createLineage(List inputFiles, List outputFiles, ByteBuffer job) throws org.apache.thrift.TException;
+
+ public boolean deleteLineage(long lineageId) throws org.apache.thrift.TException;
+
+ }
+
+ public interface AsyncIface {
+
+ public void createLineage(List inputFiles, List outputFiles, ByteBuffer job, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+ public void deleteLineage(long lineageId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+ }
+
+ public static class Client extends org.apache.thrift.TServiceClient implements Iface {
+ public static class Factory implements org.apache.thrift.TServiceClientFactory {
+ public Factory() {}
+ public Client getClient(org.apache.thrift.protocol.TProtocol prot) {
+ return new Client(prot);
+ }
+ public Client getClient(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) {
+ return new Client(iprot, oprot);
+ }
+ }
+
+ public Client(org.apache.thrift.protocol.TProtocol prot)
+ {
+ super(prot, prot);
+ }
+
+ public Client(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) {
+ super(iprot, oprot);
+ }
+
+ public long createLineage(List inputFiles, List outputFiles, ByteBuffer job) throws org.apache.thrift.TException
+ {
+ send_createLineage(inputFiles, outputFiles, job);
+ return recv_createLineage();
+ }
+
+ public void send_createLineage(List inputFiles, List outputFiles, ByteBuffer job) throws org.apache.thrift.TException
+ {
+ createLineage_args args = new createLineage_args();
+ args.setInputFiles(inputFiles);
+ args.setOutputFiles(outputFiles);
+ args.setJob(job);
+ sendBase("createLineage", args);
+ }
+
+ public long recv_createLineage() throws org.apache.thrift.TException
+ {
+ createLineage_result result = new createLineage_result();
+ receiveBase(result, "createLineage");
+ if (result.isSetSuccess()) {
+ return result.success;
+ }
+ throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "createLineage failed: unknown result");
+ }
+
+ public boolean deleteLineage(long lineageId) throws org.apache.thrift.TException
+ {
+ send_deleteLineage(lineageId);
+ return recv_deleteLineage();
+ }
+
+ public void send_deleteLineage(long lineageId) throws org.apache.thrift.TException
+ {
+ deleteLineage_args args = new deleteLineage_args();
+ args.setLineageId(lineageId);
+ sendBase("deleteLineage", args);
+ }
+
+ public boolean recv_deleteLineage() throws org.apache.thrift.TException
+ {
+ deleteLineage_result result = new deleteLineage_result();
+ receiveBase(result, "deleteLineage");
+ if (result.isSetSuccess()) {
+ return result.success;
+ }
+ throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "deleteLineage failed: unknown result");
+ }
+
+ }
+ public static class AsyncClient extends org.apache.thrift.async.TAsyncClient implements AsyncIface {
+ public static class Factory implements org.apache.thrift.async.TAsyncClientFactory {
+ private org.apache.thrift.async.TAsyncClientManager clientManager;
+ private org.apache.thrift.protocol.TProtocolFactory protocolFactory;
+ public Factory(org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.protocol.TProtocolFactory protocolFactory) {
+ this.clientManager = clientManager;
+ this.protocolFactory = protocolFactory;
+ }
+ public AsyncClient getAsyncClient(org.apache.thrift.transport.TNonblockingTransport transport) {
+ return new AsyncClient(protocolFactory, clientManager, transport);
+ }
+ }
+
+ public AsyncClient(org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.transport.TNonblockingTransport transport) {
+ super(protocolFactory, clientManager, transport);
+ }
+
+ public void createLineage(List inputFiles, List outputFiles, ByteBuffer job, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ checkReady();
+ createLineage_call method_call = new createLineage_call(inputFiles, outputFiles, job, resultHandler, this, ___protocolFactory, ___transport);
+ this.___currentMethod = method_call;
+ ___manager.call(method_call);
+ }
+
+ public static class createLineage_call extends org.apache.thrift.async.TAsyncMethodCall {
+ private List inputFiles;
+ private List outputFiles;
+ private ByteBuffer job;
+ public createLineage_call(List inputFiles, List outputFiles, ByteBuffer job, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+ super(client, protocolFactory, transport, resultHandler, false);
+ this.inputFiles = inputFiles;
+ this.outputFiles = outputFiles;
+ this.job = job;
+ }
+
+ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+ prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("createLineage", org.apache.thrift.protocol.TMessageType.CALL, 0));
+ createLineage_args args = new createLineage_args();
+ args.setInputFiles(inputFiles);
+ args.setOutputFiles(outputFiles);
+ args.setJob(job);
+ args.write(prot);
+ prot.writeMessageEnd();
+ }
+
+ public long getResult() throws org.apache.thrift.TException {
+ if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
+ throw new IllegalStateException("Method call not finished!");
+ }
+ org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
+ org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
+ return (new Client(prot)).recv_createLineage();
+ }
+ }
+
+ public void deleteLineage(long lineageId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ checkReady();
+ deleteLineage_call method_call = new deleteLineage_call(lineageId, resultHandler, this, ___protocolFactory, ___transport);
+ this.___currentMethod = method_call;
+ ___manager.call(method_call);
+ }
+
+ public static class deleteLineage_call extends org.apache.thrift.async.TAsyncMethodCall {
+ private long lineageId;
+ public deleteLineage_call(long lineageId, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+ super(client, protocolFactory, transport, resultHandler, false);
+ this.lineageId = lineageId;
+ }
+
+ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+ prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("deleteLineage", org.apache.thrift.protocol.TMessageType.CALL, 0));
+ deleteLineage_args args = new deleteLineage_args();
+ args.setLineageId(lineageId);
+ args.write(prot);
+ prot.writeMessageEnd();
+ }
+
+ public boolean getResult() throws org.apache.thrift.TException {
+ if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
+ throw new IllegalStateException("Method call not finished!");
+ }
+ org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
+ org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
+ return (new Client(prot)).recv_deleteLineage();
+ }
+ }
+
+ }
+
+ public static class Processor extends org.apache.thrift.TBaseProcessor implements org.apache.thrift.TProcessor {
+ private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
+ public Processor(I iface) {
+ super(iface, getProcessMap(new HashMap>()));
+ }
+
+ protected Processor(I iface, Map> processMap) {
+ super(iface, getProcessMap(processMap));
+ }
+
+ private static Map> getProcessMap(Map> processMap) {
+ processMap.put("createLineage", new createLineage());
+ processMap.put("deleteLineage", new deleteLineage());
+ return processMap;
+ }
+
+ public static class createLineage extends org.apache.thrift.ProcessFunction {
+ public createLineage() {
+ super("createLineage");
+ }
+
+ public createLineage_args getEmptyArgsInstance() {
+ return new createLineage_args();
+ }
+
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public createLineage_result getResult(I iface, createLineage_args args) throws org.apache.thrift.TException {
+ createLineage_result result = new createLineage_result();
+ result.success = iface.createLineage(args.inputFiles, args.outputFiles, args.job);
+ result.setSuccessIsSet(true);
+ return result;
+ }
+ }
+
+ public static class deleteLineage extends org.apache.thrift.ProcessFunction {
+ public deleteLineage() {
+ super("deleteLineage");
+ }
+
+ public deleteLineage_args getEmptyArgsInstance() {
+ return new deleteLineage_args();
+ }
+
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public deleteLineage_result getResult(I iface, deleteLineage_args args) throws org.apache.thrift.TException {
+ deleteLineage_result result = new deleteLineage_result();
+ result.success = iface.deleteLineage(args.lineageId);
+ result.setSuccessIsSet(true);
+ return result;
+ }
+ }
+
+ }
+
+ public static class AsyncProcessor extends org.apache.thrift.TBaseAsyncProcessor {
+ private static final Logger LOGGER = LoggerFactory.getLogger(AsyncProcessor.class.getName());
+ public AsyncProcessor(I iface) {
+ super(iface, getProcessMap(new HashMap>()));
+ }
+
+ protected AsyncProcessor(I iface, Map> processMap) {
+ super(iface, getProcessMap(processMap));
+ }
+
+ private static Map> getProcessMap(Map> processMap) {
+ processMap.put("createLineage", new createLineage());
+ processMap.put("deleteLineage", new deleteLineage());
+ return processMap;
+ }
+
+ public static class createLineage extends org.apache.thrift.AsyncProcessFunction {
+ public createLineage() {
+ super("createLineage");
+ }
+
+ public createLineage_args getEmptyArgsInstance() {
+ return new createLineage_args();
+ }
+
+ public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ final org.apache.thrift.AsyncProcessFunction fcall = this;
+ return new AsyncMethodCallback() {
+ public void onComplete(Long o) {
+ createLineage_result result = new createLineage_result();
+ result.success = o;
+ result.setSuccessIsSet(true);
+ try {
+ fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
+ return;
+ } catch (Exception e) {
+ LOGGER.error("Exception writing to internal frame buffer", e);
+ }
+ fb.close();
+ }
+ public void onError(Exception e) {
+ byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
+ org.apache.thrift.TBase msg;
+ createLineage_result result = new createLineage_result();
+ {
+ msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
+ msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
+ }
+ try {
+ fcall.sendResponse(fb,msg,msgType,seqid);
+ return;
+ } catch (Exception ex) {
+ LOGGER.error("Exception writing to internal frame buffer", ex);
+ }
+ fb.close();
+ }
+ };
+ }
+
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public void start(I iface, createLineage_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException {
+ iface.createLineage(args.inputFiles, args.outputFiles, args.job,resultHandler);
+ }
+ }
+
+ public static class deleteLineage extends org.apache.thrift.AsyncProcessFunction {
+ public deleteLineage() {
+ super("deleteLineage");
+ }
+
+ public deleteLineage_args getEmptyArgsInstance() {
+ return new deleteLineage_args();
+ }
+
+ public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ final org.apache.thrift.AsyncProcessFunction fcall = this;
+ return new AsyncMethodCallback() {
+ public void onComplete(Boolean o) {
+ deleteLineage_result result = new deleteLineage_result();
+ result.success = o;
+ result.setSuccessIsSet(true);
+ try {
+ fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
+ return;
+ } catch (Exception e) {
+ LOGGER.error("Exception writing to internal frame buffer", e);
+ }
+ fb.close();
+ }
+ public void onError(Exception e) {
+ byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
+ org.apache.thrift.TBase msg;
+ deleteLineage_result result = new deleteLineage_result();
+ {
+ msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
+ msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
+ }
+ try {
+ fcall.sendResponse(fb,msg,msgType,seqid);
+ return;
+ } catch (Exception ex) {
+ LOGGER.error("Exception writing to internal frame buffer", ex);
+ }
+ fb.close();
+ }
+ };
+ }
+
+ protected boolean isOneway() {
+ return false;
+ }
+
+ public void start(I iface, deleteLineage_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException {
+ iface.deleteLineage(args.lineageId,resultHandler);
+ }
+ }
+
+ }
+
+ public static class createLineage_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createLineage_args");
+
+ private static final org.apache.thrift.protocol.TField INPUT_FILES_FIELD_DESC = new org.apache.thrift.protocol.TField("inputFiles", org.apache.thrift.protocol.TType.LIST, (short)1);
+ private static final org.apache.thrift.protocol.TField OUTPUT_FILES_FIELD_DESC = new org.apache.thrift.protocol.TField("outputFiles", org.apache.thrift.protocol.TType.LIST, (short)2);
+ private static final org.apache.thrift.protocol.TField JOB_FIELD_DESC = new org.apache.thrift.protocol.TField("job", org.apache.thrift.protocol.TType.STRING, (short)3);
+
+ private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new createLineage_argsStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new createLineage_argsTupleSchemeFactory());
+ }
+
+ public List inputFiles; // required
+ public List outputFiles; // required
+ public ByteBuffer job; // required
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+ INPUT_FILES((short)1, "inputFiles"),
+ OUTPUT_FILES((short)2, "outputFiles"),
+ JOB((short)3, "job");
+
+ private static final Map byName = new HashMap();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ case 1: // INPUT_FILES
+ return INPUT_FILES;
+ case 2: // OUTPUT_FILES
+ return OUTPUT_FILES;
+ case 3: // JOB
+ return JOB;
+ default:
+ return null;
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, throwing an exception
+ * if it is not found.
+ */
+ public static _Fields findByThriftIdOrThrow(int fieldId) {
+ _Fields fields = findByThriftId(fieldId);
+ if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ return fields;
+ }
+
+ /**
+ * Find the _Fields constant that matches name, or null if its not found.
+ */
+ public static _Fields findByName(String name) {
+ return byName.get(name);
+ }
+
+ private final short _thriftId;
+ private final String _fieldName;
+
+ _Fields(short thriftId, String fieldName) {
+ _thriftId = thriftId;
+ _fieldName = fieldName;
+ }
+
+ public short getThriftFieldId() {
+ return _thriftId;
+ }
+
+ public String getFieldName() {
+ return _fieldName;
+ }
+ }
+
+ // isset id assignments
+ public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ static {
+ Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ tmpMap.put(_Fields.INPUT_FILES, new org.apache.thrift.meta_data.FieldMetaData("inputFiles", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))));
+ tmpMap.put(_Fields.OUTPUT_FILES, new org.apache.thrift.meta_data.FieldMetaData("outputFiles", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))));
+ tmpMap.put(_Fields.JOB, new org.apache.thrift.meta_data.FieldMetaData("job", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createLineage_args.class, metaDataMap);
+ }
+
+ public createLineage_args() {
+ }
+
+ public createLineage_args(
+ List inputFiles,
+ List outputFiles,
+ ByteBuffer job)
+ {
+ this();
+ this.inputFiles = inputFiles;
+ this.outputFiles = outputFiles;
+ this.job = org.apache.thrift.TBaseHelper.copyBinary(job);
+ }
+
+ /**
+ * Performs a deep copy on other.
+ */
+ public createLineage_args(createLineage_args other) {
+ if (other.isSetInputFiles()) {
+ List __this__inputFiles = new ArrayList(other.inputFiles);
+ this.inputFiles = __this__inputFiles;
+ }
+ if (other.isSetOutputFiles()) {
+ List __this__outputFiles = new ArrayList(other.outputFiles);
+ this.outputFiles = __this__outputFiles;
+ }
+ if (other.isSetJob()) {
+ this.job = org.apache.thrift.TBaseHelper.copyBinary(other.job);
+ }
+ }
+
+ public createLineage_args deepCopy() {
+ return new createLineage_args(this);
+ }
+
+ @Override
+ public void clear() {
+ this.inputFiles = null;
+ this.outputFiles = null;
+ this.job = null;
+ }
+
+ public int getInputFilesSize() {
+ return (this.inputFiles == null) ? 0 : this.inputFiles.size();
+ }
+
+ public java.util.Iterator getInputFilesIterator() {
+ return (this.inputFiles == null) ? null : this.inputFiles.iterator();
+ }
+
+ public void addToInputFiles(long elem) {
+ if (this.inputFiles == null) {
+ this.inputFiles = new ArrayList();
+ }
+ this.inputFiles.add(elem);
+ }
+
+ public List getInputFiles() {
+ return this.inputFiles;
+ }
+
+ public createLineage_args setInputFiles(List inputFiles) {
+ this.inputFiles = inputFiles;
+ return this;
+ }
+
+ public void unsetInputFiles() {
+ this.inputFiles = null;
+ }
+
+ /** Returns true if field inputFiles is set (has been assigned a value) and false otherwise */
+ public boolean isSetInputFiles() {
+ return this.inputFiles != null;
+ }
+
+ public void setInputFilesIsSet(boolean value) {
+ if (!value) {
+ this.inputFiles = null;
+ }
+ }
+
+ public int getOutputFilesSize() {
+ return (this.outputFiles == null) ? 0 : this.outputFiles.size();
+ }
+
+ public java.util.Iterator getOutputFilesIterator() {
+ return (this.outputFiles == null) ? null : this.outputFiles.iterator();
+ }
+
+ public void addToOutputFiles(long elem) {
+ if (this.outputFiles == null) {
+ this.outputFiles = new ArrayList();
+ }
+ this.outputFiles.add(elem);
+ }
+
+ public List getOutputFiles() {
+ return this.outputFiles;
+ }
+
+ public createLineage_args setOutputFiles(List outputFiles) {
+ this.outputFiles = outputFiles;
+ return this;
+ }
+
+ public void unsetOutputFiles() {
+ this.outputFiles = null;
+ }
+
+ /** Returns true if field outputFiles is set (has been assigned a value) and false otherwise */
+ public boolean isSetOutputFiles() {
+ return this.outputFiles != null;
+ }
+
+ public void setOutputFilesIsSet(boolean value) {
+ if (!value) {
+ this.outputFiles = null;
+ }
+ }
+
+ public byte[] getJob() {
+ setJob(org.apache.thrift.TBaseHelper.rightSize(job));
+ return job == null ? null : job.array();
+ }
+
+ public ByteBuffer bufferForJob() {
+ return org.apache.thrift.TBaseHelper.copyBinary(job);
+ }
+
+ public createLineage_args setJob(byte[] job) {
+ this.job = job == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(job, job.length));
+ return this;
+ }
+
+ public createLineage_args setJob(ByteBuffer job) {
+ this.job = org.apache.thrift.TBaseHelper.copyBinary(job);
+ return this;
+ }
+
+ public void unsetJob() {
+ this.job = null;
+ }
+
+ /** Returns true if field job is set (has been assigned a value) and false otherwise */
+ public boolean isSetJob() {
+ return this.job != null;
+ }
+
+ public void setJobIsSet(boolean value) {
+ if (!value) {
+ this.job = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case INPUT_FILES:
+ if (value == null) {
+ unsetInputFiles();
+ } else {
+ setInputFiles((List)value);
+ }
+ break;
+
+ case OUTPUT_FILES:
+ if (value == null) {
+ unsetOutputFiles();
+ } else {
+ setOutputFiles((List)value);
+ }
+ break;
+
+ case JOB:
+ if (value == null) {
+ unsetJob();
+ } else {
+ setJob((ByteBuffer)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case INPUT_FILES:
+ return getInputFiles();
+
+ case OUTPUT_FILES:
+ return getOutputFiles();
+
+ case JOB:
+ return getJob();
+
+ }
+ throw new IllegalStateException();
+ }
+
+ /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ public boolean isSet(_Fields field) {
+ if (field == null) {
+ throw new IllegalArgumentException();
+ }
+
+ switch (field) {
+ case INPUT_FILES:
+ return isSetInputFiles();
+ case OUTPUT_FILES:
+ return isSetOutputFiles();
+ case JOB:
+ return isSetJob();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof createLineage_args)
+ return this.equals((createLineage_args)that);
+ return false;
+ }
+
+ public boolean equals(createLineage_args that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_inputFiles = true && this.isSetInputFiles();
+ boolean that_present_inputFiles = true && that.isSetInputFiles();
+ if (this_present_inputFiles || that_present_inputFiles) {
+ if (!(this_present_inputFiles && that_present_inputFiles))
+ return false;
+ if (!this.inputFiles.equals(that.inputFiles))
+ return false;
+ }
+
+ boolean this_present_outputFiles = true && this.isSetOutputFiles();
+ boolean that_present_outputFiles = true && that.isSetOutputFiles();
+ if (this_present_outputFiles || that_present_outputFiles) {
+ if (!(this_present_outputFiles && that_present_outputFiles))
+ return false;
+ if (!this.outputFiles.equals(that.outputFiles))
+ return false;
+ }
+
+ boolean this_present_job = true && this.isSetJob();
+ boolean that_present_job = true && that.isSetJob();
+ if (this_present_job || that_present_job) {
+ if (!(this_present_job && that_present_job))
+ return false;
+ if (!this.job.equals(that.job))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ List