congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
BackupResponse
Code IndexAdd Tabnine to your IDE (free)

How to use
BackupResponse
in
alluxio.wire

Best Java code snippets using alluxio.wire.BackupResponse (Showing top 11 results out of 315)

origin: Alluxio/alluxio

/**
 * @param pResp proto options
 * @return wire type options corresponding to the proto options
 */
public static BackupResponse fromPoto(BackupPResponse pResp) {
 return new BackupResponse(new AlluxioURI(pResp.getBackupUri()), pResp.getHostname());
}
origin: Alluxio/alluxio

@Override
public int run(CommandLine cl) throws IOException {
 String[] args = cl.getArgs();
 String dir;
 if (args.length < 1) {
  dir = null;
 } else {
  dir = args[0];
 }
 boolean local = cl.hasOption(LOCAL_OPTION.getLongOpt());
 BackupResponse resp = mMetaClient.backup(dir, local);
 if (local) {
  mPrintStream.printf("Successfully backed up journal to %s on master %s%n",
    resp.getBackupUri(), resp.getHostname());
 } else {
  mPrintStream.printf("Successfully backed up journal to %s%n", resp.getBackupUri());
 }
 return 0;
}
origin: Alluxio/alluxio

@Override
public void backup(BackupPOptions options, StreamObserver<BackupPResponse> responseObserver) {
 RpcUtils.call(LOG, (RpcUtils.RpcCallableThrowsIOException<BackupPResponse>) () -> {
  return mMetaMaster.backup(BackupOptions.fromProto(options)).toProto();
 }, "backup", "options=%s", responseObserver, options);
}
origin: Alluxio/alluxio

  .getBackupUri();
FileUtils.moveFile(new File(backup.getPath()), backupDst);
cluster.stopMasters();
origin: Alluxio/alluxio

@Override
public BackupResponse backup(String targetDirectory,
                     boolean localFileSystem) throws IOException {
 return retryRPC(() -> BackupResponse.fromPoto(mClient.backup(BackupPOptions.newBuilder()
   .setTargetDirectory(targetDirectory).setLocalFileSystem(localFileSystem).build())));
}
origin: org.alluxio/alluxio-core-server-master

@Override
public BackupTResponse backup(BackupTOptions options) throws AlluxioTException {
 return RpcUtils.call((RpcUtils.RpcCallableThrowsIOException<BackupTResponse>) () -> mMetaMaster
   .backup(BackupOptions.fromThrift(options)).toThrift());
}
origin: Alluxio/alluxio

/**
 * The daily backup task.
 */
private void dailyBackup() {
 try {
  BackupResponse resp = mMetaMaster.backup(new BackupOptions(mBackupDir, mIsLocal));
  if (mIsLocal) {
   LOG.info("Successfully backed up journal to {} on master {}",
     resp.getBackupUri(), resp.getHostname());
  } else {
   LOG.info("Successfully backed up journal to {}", resp.getBackupUri());
  }
 } catch (Throwable t) {
  LOG.error("Failed to execute daily backup at {}", mBackupDir, t);
  return;
 }
 try {
  deleteStaleBackups();
 } catch (Throwable t) {
  LOG.error("Failed to delete outdated backup files at {}", mBackupDir, t);
 }
}
origin: Alluxio/alluxio

@Before
public void before() throws Exception {
 mRandom = new Random();
 mBackupDir = "/tmp/test/alluxio_backups";
 mMetaMaster = Mockito.mock(MetaMaster.class);
 when(mMetaMaster.backup(any())).thenReturn(new BackupResponse(new AlluxioURI(
   PathUtils.concatPath(mBackupDir, generateBackupFileName())), "localhost"));
 mUfs = Mockito.mock(UnderFileSystem.class);
 when(mUfs.getUnderFSType()).thenReturn("local");
 when(mUfs.deleteFile(any())).thenReturn(true);
 mScheduler = new ControllableScheduler();
}
origin: Alluxio/alluxio

return new BackupResponse(backupUri,
  NetworkAddressUtils.getConnectHost(NetworkAddressUtils.ServiceType.MASTER_RPC,
    ServerConfiguration.global()));
origin: org.alluxio/alluxio-core-common

/**
 * @param tResp thrift options
 * @return wire type options corresponding to the thrift options
 */
public static BackupResponse fromThrift(BackupTResponse tResp) {
 return new BackupResponse(new AlluxioURI(tResp.getBackupUri()), tResp.getHostname());
}
origin: org.alluxio/alluxio-core-server-master

return new BackupResponse(backupUri,
  NetworkAddressUtils.getConnectHost(ServiceType.MASTER_RPC));
alluxio.wireBackupResponse

Javadoc

Response for the backup RPC.

Most used methods

  • <init>
  • getBackupUri
  • getHostname
  • fromPoto
  • toProto
  • toThrift

Popular in Java

  • Making http requests using okhttp
  • getContentResolver (Context)
  • compareTo (BigDecimal)
  • getExternalFilesDir (Context)
  • PrintStream (java.io)
    Fake signature of an existing Java class.
  • URLEncoder (java.net)
    This class is used to encode a string using the format required by application/x-www-form-urlencoded
  • Enumeration (java.util)
    A legacy iteration interface.New code should use Iterator instead. Iterator replaces the enumeration
  • Locale (java.util)
    Locale represents a language/country/variant combination. Locales are used to alter the presentatio
  • SSLHandshakeException (javax.net.ssl)
    The exception that is thrown when a handshake could not be completed successfully.
  • IOUtils (org.apache.commons.io)
    General IO stream manipulation utilities. This class provides static utility methods for input/outpu
  • Top Sublime Text plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now