use of alluxio.wire.SyncPointInfo in project alluxio by Alluxio.
the class GetSyncPathListCommand method run.
@Override
public int run(CommandLine cl) throws AlluxioException, IOException {
List<SyncPointInfo> files = mFileSystem.getSyncPathList();
System.out.println("The following paths are under active sync");
for (SyncPointInfo syncPointInfo : files) {
System.out.print(syncPointInfo.getSyncPointUri() + "\t");
switch(syncPointInfo.getSyncStatus()) {
case NOT_INITIALLY_SYNCED:
System.out.println("Initial Sync Skipped");
break;
case INITIALLY_SYNCED:
System.out.println("Initial Sync Done");
break;
case SYNCING:
System.out.println("Initial Sync In Progress");
break;
default:
System.out.println("Invalid Syncing Status");
}
}
return 0;
}
use of alluxio.wire.SyncPointInfo in project alluxio by Alluxio.
the class ActiveSyncManager method getSyncPathList.
/**
* Get the sync point list.
*
* @return a list of URIs (sync points)
*/
public List<SyncPointInfo> getSyncPathList() {
List<SyncPointInfo> returnList = new ArrayList<>();
for (AlluxioURI uri : mSyncPathList) {
SyncPointInfo.SyncStatus status;
Future<?> syncStatus = mSyncPathStatus.get(uri);
if (syncStatus == null) {
status = SyncPointInfo.SyncStatus.NOT_INITIALLY_SYNCED;
} else if (syncStatus.isDone()) {
status = SyncPointInfo.SyncStatus.INITIALLY_SYNCED;
} else {
status = SyncPointInfo.SyncStatus.SYNCING;
}
returnList.add(new SyncPointInfo(uri, status));
}
return returnList;
}
Aggregations