예제 #1
0
 public void shutdown() throws RadosException {
   try {
     ctx.destroy();
   } finally {
     rados.shutdown();
   }
 }
예제 #2
0
 @Override
 public URI create(PnfsId id) throws IOException {
   String imageName = toImageName(id);
   rbd.create(imageName, 0);
   ctx.setXattr(
       toObjName(imageName), CREATION_TIME_ATTR, Longs.toByteArray(System.currentTimeMillis()));
   return toUri(imageName);
 }
예제 #3
0
  public CephFileStore(String poolName, String cluster, String config) throws RadosException {

    rados = new Rados(cluster, config);
    rados.connect();

    ctx = rados.createIoContext(poolName);
    rbd = ctx.createRbd();
    this.poolName = poolName;
  }