@@ -0,0 +1,1718 @@
+package com.savy3.util;%0A%0Aimport java.io.IOException;%0Aimport java.io.InputStream;%0Aimport java.io.OutputStream;%0Aimport java.net.URISyntaxException;%0Aimport java.sql.Timestamp;%0A%0Aimport org.apache.commons.net.ftp.FTP;%0Aimport org.apache.commons.net.ftp.FTPClient;%0Aimport org.apache.hadoop.fs.FileSystem;%0Aimport org.apache.hadoop.fs.Path;%0Aimport org.apache.hadoop.io.IOUtils;%0Aimport org.apache.hadoop.mapred.JobConf;%0Aimport org.apache.sqoop.mapreduce.mainframe.MainframeConfiguration;%0A%0A//import org.apache.sqoop.util.MainframeFTPClientUtils;%0A%0Apublic class FTPtoHDFS%0A%0A%7B%0A%09private static FTPClient ftp = null;%0A%0A%09public static void main(String%5B%5D args) throws IOException,%0A%09%09%09URISyntaxException %7B%0A%09%09JobConf job = new JobConf(FTPtoHDFS.class);%0A%0A%09%09job.set(%22mapreduce.mainframe.input.dataset.name%22, args%5B0%5D);%0A%09%09DBConfiguration.configureDB(job, %22manu%22, %22ftp address%22,%0A%09%09%09%09%22uid%22, %22pwd%22);%0A%09%09ftp = MainframeFTPClientUtils.getFTPConnection(job);%0A%09%09ftp.setFileType(FTP.BINARY_FILE_TYPE);%0A%09%09ftp.featureValue(%22LITERAL SITE RDW%22);%0A%09%09ftp.doCommand(%22SITE%22, %22RDW%22);%0A%09%09System.out.println(%22reply for LITERAL%22 + ftp.getReplyString());%0A%09%09String dsName = %22'%22%0A%09%09%09%09+ job.get(MainframeConfiguration.MAINFRAME_INPUT_DATASET_NAME)%0A%09%09%09%09+ %22'%22;%0A%09%09ftp.changeWorkingDirectory(dsName);%0A%09%09InputStream inputStream = ftp.retrieveFileStream(dsName);%0A%0A%09%09FileSystem fileSystem = FileSystem.get(job);%0A%09%09java.util.Date date = new java.util.Date();%0A%09%09OutputStream outputStream = fileSystem.create(new Path(args%5B1%5D));%0A%09%09System.out.println(%22FTP Start Time : %22%0A%09%09%09%09+ (new Timestamp(date.getTime())));%0A%09%09IOUtils.copyBytes(inputStream, outputStream, job, true);%0A%09%09date = new java.util.Date();%0A%09%09System.out.println(%22FTP End Time : %22 + (new Timestamp(date.getTime())));%0A%0A%09%7D%0A%0A%7D%0A

Create FTPtoHDFS.java