public abstract class AbstractSshHadoopFsMirror extends ResourceMirror
ResourceMirror
using Hadoop File System via SSH connection.FileProcess
Constructor and Description |
---|
AbstractSshHadoopFsMirror(org.apache.hadoop.conf.Configuration configuration,
SshProfile profile,
ParameterList arguments)
Creates a new instance.
|
Modifier and Type | Method and Description |
---|---|
void |
close() |
<T> DrainDriver<T> |
createDrain(ProcessScript<T> script)
Creates a new drain driver for this resource.
|
<T> SourceDriver<T> |
createSource(ProcessScript<T> script)
Creates a new source driver for this resource.
|
String |
getName()
Returns the name of this resource.
|
protected abstract SshConnection |
openConnection(SshProfile sshProfile,
List<String> command)
Opens a new SSH command connection.
|
void |
prepare(GateScript script)
Prepares this resource for the specified execution.
|
isTransactional, onSessionCompleting, onSessionCreated
public AbstractSshHadoopFsMirror(org.apache.hadoop.conf.Configuration configuration, SshProfile profile, ParameterList arguments)
configuration
- the hadoop configurationprofile
- the profilearguments
- the argumentsIllegalArgumentException
- if any parameter is null
public String getName()
ResourceMirror
getName
in class ResourceMirror
public void prepare(GateScript script) throws IOException
ResourceMirror
prepare
in class ResourceMirror
script
- target scriptIOException
- if failed to prepare this resourcepublic <T> SourceDriver<T> createSource(ProcessScript<T> script) throws IOException
ResourceMirror
ResourceMirror.prepare(GateScript)
was completed.createSource
in class ResourceMirror
T
- target data model typescript
- target processIOException
- if failed to open this resourcepublic <T> DrainDriver<T> createDrain(ProcessScript<T> script) throws IOException
ResourceMirror
ResourceMirror.prepare(GateScript)
was completed.createDrain
in class ResourceMirror
T
- target data model typescript
- target processIOException
- if failed to open this resourceprotected abstract SshConnection openConnection(SshProfile sshProfile, List<String> command) throws IOException
sshProfile
- the ssh profilecommand
- target commandIOException
- if failed to openpublic void close() throws IOException
IOException
Copyright © 2011–2019 Asakusa Framework Team. All rights reserved.