/** Verify if the snapshot name is legal. */ static void verifySnapshotName(FSDirectory fsd, String snapshotName, String path) throws FSLimitException.PathComponentTooLongException { if (snapshotName.contains(Path.SEPARATOR)) { throw new HadoopIllegalArgumentException( "Snapshot name cannot contain \"" + Path.SEPARATOR + "\""); } final byte[] bytes = DFSUtil.string2Bytes(snapshotName); fsd.verifyINodeName(bytes); fsd.verifyMaxComponentLength(bytes, path); }
if (NameNodeLayoutVersion.supports( LayoutVersion.Feature.SNAPSHOT, imgVersion)) { namesystem.getFSDirectory().verifyINodeName(localName);
verifyINodeName(inode.getLocalNameBytes());
/** Verify if the snapshot name is legal. */ static void verifySnapshotName(FSDirectory fsd, String snapshotName, String path) throws FSLimitException.PathComponentTooLongException { if (snapshotName.contains(Path.SEPARATOR)) { throw new HadoopIllegalArgumentException( "Snapshot name cannot contain \"" + Path.SEPARATOR + "\""); } final byte[] bytes = DFSUtil.string2Bytes(snapshotName); fsd.verifyINodeName(bytes); fsd.verifyMaxComponentLength(bytes, path); }
/** Verify if the snapshot name is legal. */ static void verifySnapshotName(FSDirectory fsd, String snapshotName, String path) throws FSLimitException.PathComponentTooLongException { if (snapshotName.contains(Path.SEPARATOR)) { throw new HadoopIllegalArgumentException( "Snapshot name cannot contain \"" + Path.SEPARATOR + "\""); } final byte[] bytes = DFSUtil.string2Bytes(snapshotName); fsd.verifyINodeName(bytes); fsd.verifyMaxComponentLength(bytes, path); }
if (NameNodeLayoutVersion.supports( LayoutVersion.Feature.SNAPSHOT, imgVersion)) { namesystem.getFSDirectory().verifyINodeName(localName);
if (NameNodeLayoutVersion.supports( LayoutVersion.Feature.SNAPSHOT, imgVersion)) { namesystem.getFSDirectory().verifyINodeName(localName);
verifyINodeName(inode.getLocalNameBytes());
verifyINodeName(inode.getLocalNameBytes());