}
return getForWrite(partion,forwrite);
}
synchronized (forReadOnlyDir) {
MdrillDirectory rtdir=forReadOnlyDir.get(p);
if(rtdir!=null)
{
rtdir.setCore(this);
rtdir.setPartion(p);
return rtdir;
}
File f = new File(getDataDir(), partion);
ReadOnlyDirectory ddd=new ReadOnlyDirectory(f , HadoopUtil.hadoopConfDir, ShardPartion.getHdfsRealtimePath(p.tablename,p.partion).toString());
rtdir=ddd;
forReadOnlyDir.put(p, ddd);
rtdir.setCore(this);
rtdir.setPartion(p);
return rtdir;
}
}