    public FileSystemProvider(CollectorConfig collectorConfig) throws IOException
    {
        String hfsHost = collectorConfig.getHfsHost();
        Configuration hadoopConfig = new Configuration();
        if (hfsHost.isEmpty()) {
            hadoopConfig.set("fs.default.name", "file:///");
        }
        else {
            hadoopConfig.set("fs.default.name", hfsHost);
        }
        hadoopConfig.setLong("dfs.block.size", collectorConfig.getHadoopBlockSize());
        hadoopConfig.set("serialization.job.ugi", collectorConfig.getHadoopUgi());
        hadoopConfig.setStrings("io.serializations", HadoopThriftWritableSerialization.class.getName(), HadoopThriftEnvelopeSerialization.class.getName(), "org.apache.hadoop.io.serializer.WritableSerialization");
        fileSystem = FileSystem.get(hadoopConfig);
    }

    public FileSystemProvider(CollectorConfig collectorConfig) throws IOException
    {
        String hfsHost = collectorConfig.getHfsHost();
        Configuration hadoopConfig = new Configuration();
        if (hfsHost.isEmpty()) {
            hadoopConfig.set("fs.default.name", "file:///");
        }
        else {
            hadoopConfig.set("fs.default.name", hfsHost);
        }
        hadoopConfig.setLong("dfs.block.size", collectorConfig.getHadoopBlockSize());
        hadoopConfig.set("hadoop.job.ugi", collectorConfig.getHadoopUgi());
        hadoopConfig.setStrings("io.serializations", HadoopThriftWritableSerialization.class.getName(), HadoopThriftEnvelopeSerialization.class.getName(), "org.apache.hadoop.io.serializer.WritableSerialization");
        fileSystem = FileSystem.get(hadoopConfig);
    }
