hbase-server/src/main/java/org/apache/hadoop/hbase/master/MasterRpcServices.java
/**
   * Execute Restore/Clone snapshot operation.
   *
   * <p>If the specified table exists a "Restore" is executed, replacing the table
   * schema and directory data with the content of the snapshot.
   * The table must be disabled, or a UnsupportedOperationException will be thrown.
   *
   * <p>If the table doesn't exist a "Clone" is executed, a new table is created
   * using the schema at the time of the snapshot, and the content of the snapshot.
   *
   * <p>The restore/clone operation does not require copying HFiles. Since HFiles
   * are immutable the table can point to and use the same files as the original one.
   */
Execute Restore/Clone snapshot operation.
If the specified table exists a "Restore" is executed, replacing the table
schema and directory data with the content of the snapshot.
The table must be disabled, or a UnsupportedOperationException will be thrown.

If the table doesn't exist a "Clone" is executed, a new table is created
using the schema at the time of the snapshot, and the content of the snapshot.

The restore/clone operation does not require copying HFiles. Since HFiles
are immutable the table can point to and use the same files as the original one.
Execute Restore / Clone snapshot operation . If the specified table exists a " Restore " is executed replacing the table schema and directory data with the content of the snapshot . The table must be disabled or a UnsupportedOperationException will be thrown . If the table doesn ' t exist a " Clone " is executed a new table is created using the schema at the time of the snapshot and the content of the snapshot . The restore / clone operation does not require copying HFiles . Since HFiles are immutable the table can point to and use the same files as the original one .
@Override
  public RestoreSnapshotResponse restoreSnapshot(RpcController controller,
      RestoreSnapshotRequest request) throws ServiceException {
    try {
      long procId = master.restoreSnapshot(request.getSnapshot(), request.getNonceGroup(),
        request.getNonce(), request.getRestoreACL());
      return RestoreSnapshotResponse.newBuilder().setProcId(procId).build();
    } catch (ForeignException e) {
      throw new ServiceException(e.getCause());
    } catch (IOException e) {
      throw new ServiceException(e);
    }
  }
@ Override public RestoreSnapshotResponse restoreSnapshot ( RpcController controller , RestoreSnapshotRequest request ) throws ServiceException { try { long procId = master . restoreSnapshot ( request . getSnapshot ( ) , request . getNonceGroup ( ) , request . getNonce ( ) , request . getRestoreACL ( ) ) ; return RestoreSnapshotResponse . newBuilder ( ) . setProcId ( procId ) . build ( ) ; } catch ( ForeignException e ) { throw new ServiceException ( e . getCause ( ) ) ; } catch ( IOException e ) { throw new ServiceException ( e ) ; } }
Execute Restore/Clone snapshot operation.
Execute Restore / Clone snapshot operation .