private StorePath uploadFileAndMetaData(StorageNode client, InputStream inputStream, long fileSize,
                                            String fileExtName, Set<MetaData> metaDataSet) {
        // 上传文件
        StorageUploadFileCommand command = new StorageUploadFileCommand(client.getStoreIndex(), inputStream,
                fileExtName, fileSize, false);
        StorePath path = connectionManager.executeFdfsCmd(client.getInetSocketAddress(), command);
        // 上传metadata
        if (hasMetaData(metaDataSet)) {
            StorageSetMetadataCommand setMDCommand = new StorageSetMetadataCommand(path.getGroup(), path.getPath(),
                    metaDataSet, StorageMetadataSetType.STORAGE_SET_METADATA_FLAG_OVERWRITE);
            connectionManager.executeFdfsCmd(client.getInetSocketAddress(), setMDCommand);
        }
        return path;
    }
private StorePath uploadFileAndMetaData ( StorageNode client , InputStream inputStream , long fileSize , String fileExtName , Set < MetaData > metaDataSet ) { StorageUploadFileCommand command = new StorageUploadFileCommand ( client . getStoreIndex ( ) , inputStream , fileExtName , fileSize , false ) ; StorePath path = connectionManager . executeFdfsCmd ( client . getInetSocketAddress ( ) , command ) ; if ( hasMetaData ( metaDataSet ) ) { StorageSetMetadataCommand setMDCommand = new StorageSetMetadataCommand ( path . getGroup ( ) , path . getPath ( ) , metaDataSet , StorageMetadataSetType . STORAGE_SET_METADATA_FLAG_OVERWRITE ) ; connectionManager . executeFdfsCmd ( client . getInetSocketAddress ( ) , setMDCommand ) ; } return path ; }
上传文件和元数据

@param client
@param inputStream
@param fileSize
@param fileExtName
@param metaDataSet
@return