Unlock instant, AI-driven research and patent intelligence for your innovation.

File storage and retrieval method, device, storage medium and server

A file storage and file retrieval technology, applied in the field of big data processing, can solve the problems of consuming a lot of time, consuming startup tasks and release tasks, etc., and achieve the effect of reducing pressure and effectively utilizing storage resources

Inactive Publication Date: 2019-02-01
RUN TECH CO LTD BEIJING
View PDF6 Cites 2 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

Each small file occupies a slot, and task task startup will take a lot of time or even most of the time spent on starting tasks and releasing tasks

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • File storage and retrieval method, device, storage medium and server
  • File storage and retrieval method, device, storage medium and server
  • File storage and retrieval method, device, storage medium and server

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0054] figure 1 It is a schematic flow chart of the file storage method provided by the embodiment of the present invention. This method is applicable to the situation where the server manages small files reasonably, and can be executed by a file storage device. The device can be implemented by software and / or hardware, and generally can be integrated in the server. Such as figure 1 As shown, the method includes:

[0055] S101. Acquire file information of a small file, where the size of the small file is smaller than a preset threshold.

[0056] In the embodiment of the present invention, when the size of a certain file is smaller than a preset threshold, the file may be called a small file. For example, if the preset threshold is 64K, a file whose size is smaller than 64K may be called a small file. The file information of the small file is acquired, wherein the file information of the small file may include any information related to the small file. Exemplarily, the file...

Embodiment 2

[0066] figure 2 It is a flowchart of a file storage method provided in Embodiment 2 of the present invention. This embodiment is optimized on the basis of the foregoing embodiments. In this embodiment, the file storage method for obtaining the file information of the small file includes: judging whether the file in the HDFS is a small file, and if so, obtaining the small file in the HDFS The file information; Based on the primary key, writing the small file into the pre-created database Hbase table includes: determining the position of the small file in HDFS, and based on the primary key and the location of the small file in HDFS location, write the small files in the HDFS into the pre-created database Hbase table in the form of a binary stream. After writing the small files in the HDFS into the pre-created database Hbase table in the form of a binary stream based on the primary key and the position of the small files in the HDFS, it also includes: closing the binary stream,...

Embodiment 3

[0076] image 3 It is a flowchart of a file storage method provided by Embodiment 3 of the present invention. The present embodiment optimizes on the basis of the foregoing embodiments. In the present embodiment, the Hbase table of the database includes memory space; writing the small file into the Hbase table of the database created in advance based on the primary key includes: The primary key writes the small file into the memory space in the pre-created database Hbase table; when the current available space of the memory space is less than the preset memory threshold, writes the small file into HDFS in the form of a storage file . Correspondingly, the method in this embodiment specifically includes:

[0077] S301. Acquire file information of a small file, where the size of the small file is smaller than a preset threshold.

[0078] S302. Generate a primary key uniquely corresponding to the small file according to the file information according to preset rules.

[0079] ...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The embodiment of the invention discloses a file storage and retrieval method, a device, a storage medium and a server. The file storage method comprises the following steps: obtaining file information of a small file, wherein, the size of the small file is smaller than a preset threshold value; Generating a primary key uniquely corresponding to the small file according to the preset rule according to the file information; The small file is written into a pre-created database Hbase table based on the primary key. The technical proposal provided by the embodiment of the invention can effectively utilize the high reliability, high performance, column-oriented and scalable distributed storage system of Hbase, realize the storage of a large amount of small file columns, alleviate the pressureof HDFS on metadata management, and achieve the effect of effective utilization of HDFS storage resources.

Description

technical field [0001] Embodiments of the present invention relate to the technical field of big data processing, and in particular to file storage and retrieval methods, devices, storage media and servers. Background technique [0002] HDFS (Hadoop Distributed File System) provides basic storage services for the entire distributed computing Hadoop ecosystem. It can be said that the entire architecture of hadoop is based on HDFS. HDFS is specially produced to solve the problem of large data storage, and the HDFS file system is specially designed to store very large files. For the Hadoop system, small files are usually defined as files that are much smaller than the block size of HDFS (default 128MB). Since each file will generate its own metadata MetaData, Hadoop stores this information through the namespace Namenode. If a small file Too many will easily lead to bottlenecks in Namenode storage. [0003] In some business scenarios, Hadoop has to accept the landing of a lar...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
IPC IPC(8): G06F16/182G06F16/13
Inventor 万月亮张海涛火一莽
Owner RUN TECH CO LTD BEIJING