fix hdfs config

This commit is contained in:
fjy 2013-06-28 10:18:10 -07:00
parent cce62cbd8b
commit 5a57539736
2 changed files with 3 additions and 2 deletions

View File

@ -43,7 +43,7 @@ public class HdfsDataSegmentPusher implements DataSegmentPusher
public DataSegment push(File inDir, DataSegment segment) throws IOException
{
final String storageDir = DataSegmentPusherUtil.getStorageDir(segment);
Path outFile = new Path(String.format("%s/%s/index.zip", config.getStorageDirectory(), storageDir));
Path outFile = config.getStorageDirectory().suffix(String.format("/%s/index.zip", storageDir));
FileSystem fs = outFile.getFileSystem(hadoopConfig);
fs.mkdirs(outFile.getParent());

View File

@ -19,6 +19,7 @@
package com.metamx.druid.loading;
import org.apache.hadoop.fs.Path;
import org.skife.config.Config;
import java.io.File;
@ -28,5 +29,5 @@ import java.io.File;
public abstract class HdfsDataSegmentPusherConfig
{
@Config("druid.pusher.hdfs.storageDirectory")
public abstract File getStorageDirectory();
public abstract Path getStorageDirectory();
}