public synchronized void asyncCompleteFile(long fileId) throws IOException { int retry = 0; while (!mClosed && (retry ++) <= RPC_MAX_NUM_RETRY) { connect(); try { mClient.asyncCompleteFile(fileId); return; } catch (TException e) { LOG.error(e.getMessage(), e); mConnected = false; } } throw new IOException("Failed after " + retry + " retries."); }
public synchronized long createLineage(List<String> inputFiles, List<String> outputFiles, CommandLineJob job) throws IOException, TachyonException { // prepare for RPC int retry = 0; while (!mClosed && (retry ++) <= RPC_MAX_NUM_RETRY) { connect(); try { return mClient.createLineage(inputFiles, outputFiles, job.generateCommandLineJobInfo()); } catch (TachyonTException e) { throw new TachyonException(e); } catch (TException e) { LOG.error(e.getMessage(), e); mConnected = false; } } throw new IOException("Failed after " + retry + " retries."); }
public synchronized boolean deleteLineage(long lineageId, boolean cascade) throws IOException, TachyonException { int retry = 0; while (!mClosed && (retry ++) <= RPC_MAX_NUM_RETRY) { connect(); try { return mClient.deleteLineage(lineageId, cascade); } catch (TachyonTException e) { throw new TachyonException(e); } catch (TException e) { LOG.error(e.getMessage(), e); mConnected = false; } } throw new IOException("Failed after " + retry + " retries."); }
/** * Instructs a worker to persist the files for checkpoint. * * @param workerId the id of the worker that heartbeats * @param persistedFiles the persisted files * @return the command for checkpointing the blocks of a file * @throws IOException if file persistence fails */ public synchronized LineageCommand workerLineageHeartbeat(long workerId, List<Long> persistedFiles) throws IOException { int retry = 0; while (!mClosed && (retry ++) <= RPC_MAX_NUM_RETRY) { connect(); try { return mClient.workerLineageHeartbeat(workerId, persistedFiles); } catch (TException e) { LOG.error(e.getMessage(), e); mConnected = false; } } throw new IOException("Failed after " + retry + " retries."); } }
public synchronized long reinitializeFile(String path, long blockSizeBytes, long ttl) throws IOException, TachyonException { int retry = 0; while (!mClosed && (retry ++) <= RPC_MAX_NUM_RETRY) { connect(); try { return mClient.reinitializeFile(path, blockSizeBytes, ttl); } catch (TachyonTException e) { throw new TachyonException(e); } catch (TException e) { LOG.error(e.getMessage(), e); mConnected = false; } } throw new IOException("Failed after " + retry + " retries."); }
public synchronized List<LineageInfo> getLineageInfoList() throws IOException { int retry = 0; while (!mClosed && (retry ++) <= RPC_MAX_NUM_RETRY) { connect(); try { return mClient.getLineageInfoList(); } catch (TException e) { LOG.error(e.getMessage(), e); mConnected = false; } } throw new IOException("Failed after " + retry + " retries."); } }
@Override protected void afterConnect() { mClient = new LineageMasterService.Client(mProtocol); }
@Override protected void afterConnect() { mClient = new LineageMasterService.Client(mProtocol); }