@Override public void inc() { getInstance().inc(); }
private SegmentHandle doCreate(String streamSegmentName) throws IOException { long traceId = LoggerHelpers.traceEnter(log, "create", streamSegmentName); FileAttribute<Set<PosixFilePermission>> fileAttributes = PosixFilePermissions.asFileAttribute(READ_WRITE_PERMISSION); Path path = Paths.get(config.getRoot(), streamSegmentName); Path parent = path.getParent(); assert parent != null; Files.createDirectories(parent); Files.createFile(path, fileAttributes); LoggerHelpers.traceLeave(log, "create", traceId); FileSystemMetrics.CREATE_COUNT.inc(); return FileSystemSegmentHandle.writeHandle(streamSegmentName); }
HDFSMetrics.CREATE_COUNT.inc(); log.debug("Created '{}'.", fullPath); } catch (IOException e) {