package com.whh.bigdata.test;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.fs.FileStatus;
import org.apache.hadoop.fs.FileSystem;
import org.apache.hadoop.fs.FileUtil;
import org.apache.hadoop.fs.Path;
import java.io.*;
import java.net.URI;
import java.net.URISyntaxException;
/**
* Created by whh on 2018/2/7.
*/
public class HdfsFile {
/**
* 往local文件里写数据
*/
public static void appendToFile(String sDestFile, String sContent) {
// String sContent = "I love Ysm";
// String sDestFile = "F:/work/logParse/autoCreateHql/myWrite.txt";
File destFile = new File(sDestFile);
BufferedWriter out = null;
if (!destFile.exists()) {
try {
destFile.createNewFile();
} catc