freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

云存儲系統(tǒng)的實現(xiàn)畢業(yè)設(shè)計論文-資料下載頁

2025-06-19 13:23本頁面
  

【正文】 。import .*。//import 。import 。import 。import 。import 。import 。import 。import 。import 。import 。import 。import 。import 。import 。import 。import 。import 。import 。import 。import 。import 。import 。import 。import 。public class CreateFiles { private static final int NULL = 0。 public static boolean downOrUpLoad = false。//false。 //false = upload。 ture = down load JFrame frame = null。 JRadioButton buttonUpload = null。 public CreateFiles() { frame = new JFrame(HDFS file Up/Down load)。 } public void setOperator(boolean b) { if(b) { downOrUpLoad = true。 } else { downOrUpLoad = false。 } } public void init() { // } public static void main(String args[]) throws Exception { //Frame set //JFrame frame = new JFrame(HDFS file Up/Down load)。 CreateFiles operator = new CreateFiles()。 JPanel panel = new JPanel()。 SpringLayout lay = new SpringLayout()。 JTextArea textLocalPath = new JTextArea(G:\\,1,20)。 JTextArea textState = new JTextArea(System Running normal!,1,20)。 JFileChooser fileChooser = new JFileChooser()。 JLabel labelLocalPath = new JLabel(Local Path: )。 JLabel labelHDFSPath = new JLabel(HDFS Path: hdfs:localhost:9000/user/userFile/)。 JLabel labelHDFSFile = new JLabel(HDFS File:)。 JLabel labelState = new JLabel(State: )。 = new JRadioButton(Upload)。 JRadioButton buttonDownload = new JRadioButton(Download)。 JButton buttonOK = new JButton(O K)。 //static JButton buttonCancel = new JButton(Cancel)。 JButton buttonDir = new JButton(DIR)。 ButtonGroup bgGroup = new ButtonGroup()。 String[] HDFSFiles = {NULL }。 JComboBox HDFSFileList = new JComboBox(HDFSFiles)。 (600, 400)。 (400, 100)。 (true)。 ()。 (panel)。 //Button set ()。 (buttonDownload)。 ()。 (buttonDownload)。 (buttonDir)。 //(())。 //(())。 (Enter this button will upload/download file to/from HDFS from/to local!)。 // (Enter this button will cancel upload/download file to/from HDFS from/to local!)。 (buttonOK)。 // (buttonCancel)。 //Label set (labelLocalPath)。 (labelHDFSPath)。 (labelHDFSFile)。 (labelState)。 //text (textLocalPath)。 (textState)。 //(false)。 //JCombobox (HDFSFileList)。 //(50, 10)。 //file choose ()。//only can choose file not direct //(fileChooser)。 //set position (lay)。 //upload button position (, , 10, , panel)。 (, , 200, , panel)。 //download button position (, buttonDownload, 10, , panel)。 (, buttonDownload, 300, , panel)。 //local path label position (, labelLocalPath, 50, , panel)。 (, labelLocalPath, 100, , panel)。 //local path text position (, textLocalPath, 50, , panel)。 (, textLocalPath, 180, , panel)。 //fileselect button label position (, buttonDir, 40, , panel)。 (, buttonDir, 420, , panel)。 //HDFS path label position (, labelHDFSPath, 90, , panel)。 (, labelHDFSPath, 100, , panel)。 //HDFS file label position (, labelHDFSFile, 130, , panel)。 (, labelHDFSFile, 100, , panel)。 //HDFS file list position (, HDFSFileList, 130, , panel)。 (, HDFSFileList, 180, , panel)。 //cancel button position //(, buttonCancel, 130, , panel)。 //(, buttonCancel, 420, , panel)。 //(130, 420, 10, 30)。 //State label position (, labelState, 170, , panel)。 (, labelState, 100, , panel)。 //State label position (, textState, 170, , panel)。 (, textState, 180, , panel)。 //OK button position (, buttonOK, 170, , panel)。 (, buttonOK, 420, , panel)。 (90, 420, 10, 30)。 int fileCount = 0。 Configuration conf = new Configuration()。 FileSystem hdfs = (conf)。 (Upload to + ()+\n)。 String stringLocal = G:\\。 String stringHDFS = /user/userFile/。 //byte buff[] = Hello my honey,Julie!\n.getBytes()。 Path pathLocal = new Path(stringLocal)。 //the upload file local path Path pathHDFS = new Path(stringHDFS)。 //the download file local path //calculate the file and direct count at hdfs path FileStatus files[] = (pathHDFS)。 for(FileStatus file : files){ (())。 fileCount++。 } /*(new ActionListener() { public void actionPerformed(ActionEvent Event) { if(downOrUpLoad) { downOrUpLoad = false。 } else { downOrUpLoad = true。 } } })。*/ if(downOrUpLoad) //default value is false {//download // if((downLoadToLocal)) //local download { // (File/Dir: \+downLoadToLocal+\ is not exist! Created new one!\n)。 // (hdfs, downLoadToLocal, NULL)。 } FileSystem fs = ((stringHDFS),conf)。//構(gòu)建FileSystem InputStream is=(pathHDFS)。//讀取文件 OutputStream out = new FileOutputStream(stringLocal)。 //byte[] ioBuffer = new byte[1024]。 //int readLen = (ioBuffer)。 //while(1 != readLen) { // (ioBuffer, 0, readLen)。 // readLen = (ioBuffer)。 } (is, out,4096,true)。//保存到本地 最后 關(guān)閉輸入輸出流 (Upload to + ()+\n)。 } else {//upload if((upLoadFromLocal)) //local upload { // (Wrong:local path \+upLoadFromLocal+\ is not exist!\n)。 } InputStream in = new BufferedInputStream(new FileInputStream(stringLocal))。 FileSystem fs = ((stringHDFS), conf)。 OutputStream out = (pathHDFS)。 (in, out, 4096, true)。 (Upload to + ()+\n)。 } if(downOrUpLoad) { (download!\n)。 } else { (UpLoad!\n)。 } (Files Count: +fileCount)。 }}
點擊復(fù)制文檔內(nèi)容
范文總結(jié)相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1