Package alluxio.underfs.hdfs.activesync
Class SupportedHdfsActiveSyncProvider
- java.lang.Object
-
- alluxio.underfs.hdfs.activesync.SupportedHdfsActiveSyncProvider
-
- All Implemented Interfaces:
HdfsActiveSyncProvider
public class SupportedHdfsActiveSyncProvider extends java.lang.Object implements HdfsActiveSyncProvider
Supported Hdfs Active Sync Provider.
-
-
Constructor Summary
Constructors Constructor Description SupportedHdfsActiveSyncProvider(java.net.URI uri, org.apache.hadoop.conf.Configuration conf, alluxio.underfs.UnderFileSystemConfiguration ufsConf)
Constructor for supported Hdfs Active Sync Provider.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description alluxio.SyncInfo
getActivitySyncInfo()
Get the activity sync info.void
pollEvent(org.apache.hadoop.hdfs.DFSInotifyEventInputStream eventStream)
Fetch and process events.boolean
startPolling(long txId)
start polling thread.void
startSync(alluxio.AlluxioURI ufsUri)
startSync on a ufs uri.boolean
stopPolling()
stop polling thread.void
stopSync(alluxio.AlluxioURI ufsUri)
stop sync on a ufs uri.
-
-
-
Constructor Detail
-
SupportedHdfsActiveSyncProvider
public SupportedHdfsActiveSyncProvider(java.net.URI uri, org.apache.hadoop.conf.Configuration conf, alluxio.underfs.UnderFileSystemConfiguration ufsConf) throws java.io.IOException
Constructor for supported Hdfs Active Sync Provider.- Parameters:
uri
- the hdfs uriconf
- the hdfs confufsConf
- Alluxio UFS configuration- Throws:
java.io.IOException
-
-
Method Detail
-
startPolling
public boolean startPolling(long txId) throws java.io.IOException
Description copied from interface:HdfsActiveSyncProvider
start polling thread.- Specified by:
startPolling
in interfaceHdfsActiveSyncProvider
- Parameters:
txId
- transaction id to start monitoring- Returns:
- true if polling thread started successfully
- Throws:
java.io.IOException
-
stopPolling
public boolean stopPolling()
Description copied from interface:HdfsActiveSyncProvider
stop polling thread.- Specified by:
stopPolling
in interfaceHdfsActiveSyncProvider
- Returns:
- true if polling thread stopped successfully
-
startSync
public void startSync(alluxio.AlluxioURI ufsUri)
startSync on a ufs uri.- Specified by:
startSync
in interfaceHdfsActiveSyncProvider
- Parameters:
ufsUri
- the ufs uri to monitor for sync
-
stopSync
public void stopSync(alluxio.AlluxioURI ufsUri)
stop sync on a ufs uri.- Specified by:
stopSync
in interfaceHdfsActiveSyncProvider
- Parameters:
ufsUri
- the ufs uri to stop monitoring for sync
-
pollEvent
public void pollEvent(org.apache.hadoop.hdfs.DFSInotifyEventInputStream eventStream)
Fetch and process events.- Parameters:
eventStream
- event stream
-
getActivitySyncInfo
public alluxio.SyncInfo getActivitySyncInfo()
Get the activity sync info.- Specified by:
getActivitySyncInfo
in interfaceHdfsActiveSyncProvider
- Returns:
- SyncInfo object which encapsulates the necessary information about changes
-
-