@Override
public void create() {
IFileSystem fs = FileSystemRegistry.get(new FileSystemRegKey("localhost", Configs.getFSConfig().getRootDir()));
BlockId blockId = new BlockId(containerId);
Block block = new Block(blockId);
block.setBytes(data);
try
{
blockId = fs.append(block, only);
JSONNode root = JSONHelper.createSuccessNode();
JSONAttribute containerId = new JSONAttribute("containerId", ""+blockId.getContainerId(), AttrType.Number);
JSONAttribute segmentId = new JSONAttribute("segmentId", ""+blockId.getSegmentId(), AttrType.Number);
JSONAttribute id = new JSONAttribute("blockId", ""+blockId.getId(), AttrType.Number);
root.add(containerId);
root.add(segmentId);
root.add(id);
out.println(root.toJSONString());