示例#1
0
bs_file_t hdfs_file_open(struct back_storage *storage,const char *path,int flags){
	//HLOG_DEBUG("hdfs -- enter func %s", __func__);
    int  _flags = 0;
    if(flags == BS_READONLY){
       _flags = O_RDONLY;
    }else if (flags == BS_WRITEABLE){
       _flags = O_WRONLY|O_APPEND;
    }else{
       //HLOG_DEBUG("open with error flags:%d",flags);
	   return NULL;
    }
	//HLOG_DEBUG("hdfs -- leave func %s", __func__);
    return  __hlfs_file_open(storage,path,_flags);
}
示例#2
0
bs_file_t  hdfs_file_create(struct back_storage *storage, const char *path){
	//HLOG_DEBUG("hdfs -- enter func %s", __func__);
	int _flags = O_WRONLY;
	//HLOG_DEBUG("hdfs -- leave func %s", __func__);
	return __hlfs_file_open(storage, path, _flags);
}