File tree Expand file tree Collapse file tree 3 files changed +7
-0
lines changed
src/main/java/org/embulk/output/sftp Expand file tree Collapse file tree 3 files changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ Stores files on a SFTP Server
1818- ** secret_key_file** : (string, default: ` null ` )
1919- ** secret_key_passphrase** : (string, default: ` "" ` )
2020- ** user_directory_is_root** : (boolean, default: ` true ` )
21+ - ** timeout** : sftp connection timeout seconds (integer, default: ` 600 ` )
2122- ** path_prefix** : Prefix of output paths (string, required)
2223- ** file_ext** : Extension of output files (string, required)
2324- ** sequence_format** : Format for sequence part of output files (string, default: ` ".%03d.%02d" ` )
3334 secret_key_file : /Users/civitaspo/.ssh/id_rsa
3435 secret_key_passphrase : secret_pass
3536 user_directory_is_root : false
37+ timeout : 600
3638 path_prefix : /data/sftp
3739 file_ext : _20151020.tsv
3840 sequence_format : " .%01d%01d"
Original file line number Diff line number Diff line change @@ -76,6 +76,7 @@ private FileSystemOptions initializeFsOptions(PluginTask task)
7676
7777 try {
7878 SftpFileSystemConfigBuilder .getInstance ().setUserDirIsRoot (fsOptions , task .getUserDirIsRoot ());
79+ SftpFileSystemConfigBuilder .getInstance ().setTimeout (fsOptions , task .getSftpConnectionTimeout ());
7980 SftpFileSystemConfigBuilder .getInstance ().setStrictHostKeyChecking (fsOptions , "no" );
8081 if (task .getSecretKeyFilePath ().isPresent ()) {
8182 IdentityInfo identityInfo = new IdentityInfo (new File ((task .getSecretKeyFilePath ().get ())), task .getSecretKeyPassphrase ().getBytes ());
Original file line number Diff line number Diff line change @@ -49,6 +49,10 @@ public interface PluginTask
4949 @ ConfigDefault ("true" )
5050 public Boolean getUserDirIsRoot ();
5151
52+ @ Config ("timeout" )
53+ @ ConfigDefault ("600" ) // 10 munites
54+ public int getSftpConnectionTimeout ();
55+
5256 @ Config ("path_prefix" )
5357 public String getPathPrefix ();
5458
You can’t perform that action at this time.
0 commit comments