Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Managed Threat Detection
Blockchain
Blockchain Service
Web3 Node Engine Service
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
SoftWare Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive
On this page

HBase HFS Java APIs

Updated on 2024-08-16 GMT+08:00

Prerequisites

The cluster version is earlier than MRS 3.x.

API Description

This section describes major classes.

Common APIs of org.apache.hadoop.hbase.filestream.client.FSTableInterface:

Method

Description

void put(FSPut fsPut)

Inserts data into HFS tables.

void put(List<FSPut> fsPuts)

Inserts data into HFS tables in batches.

FSResult get(FSGet fsGet)

Reads data from HFS tables.

FSResult[] get(List<FSGet> fsGets)

Reads multiple lines of data from HFS tables.

void delete(FSDelete fsDelete)

Deletes data from HFS tables.

void delete(List<FSDelete> fsDeletes)

Deletes multiple lines of data from HFS tables.

void close()

Closes a table object.

org.apache.hadoop.hbase.filestream.client.FSTable is the implementation class of org.apache.hadoop.hbase.filestream.client.FSTableInterface.

org.apache.hadoop.hbase.filestream.client.FSHColumnDescriptor inherits from org.apache.hadoop.hbase.HColumnDescriptor. The following APIs are added:

Method

Description

public void setFileColumn()

Sets the column family of stored files to this column family.

public void setFileThreshold(int fileThreshold)

Sets the threshold for the size of stored files.

org.apache.hadoop.hbase.filestream.client.FSTableDescriptor inherits from org.apache.hadoop.hbase.HTableDescriptor without added APIs. This class is required when Java APIs are used to create HFS tables for storing files.

org.apache.hadoop.hbase.filestream.client.FSPut inherits from org.apache.hadoop.hbase.Put. The following APIs are added:

Method

Description

public FSPut(byte[] row)

Constructor. It constructs an object using Rowkeys.

public FSPut(byte[] row, long timestamp)

Constructor. It constructs an object using Rowkeys and timestamps.

public void addFile(String name, byte[] value)

Inserts a file into the column family of the stored files in the HFS table, with name as the column name and value as the file content.

public void addFile(String name, byte[] value, long ts)

Inserts a file into the column family of the stored files in the HFS table, with name as the column name, value as the file content, and ts as the specified timestamp.

public void addFile(String name, InputStream inputStream)

Inserts a file into the column family of the stored files in the HFS table, with name as the column name and inputStream as the input stream object of the file.

The input stream object needs to be closed by the invoker.

public void addFile(String name, InputStream inputStream, long ts)

Inserts a file into the column family of the stored files in the HFS table, with name as the column name, inputStream as the input stream object of the file, and ts as the specified timestamp.

The input stream object needs to be closed by the invoker.

org.apache.hadoop.hbase.filestream.client.FSGet inherits from org.apache.hadoop.hbase.Get. The following APIs are added:

Method

Description

public FSGet(byte[] row)

Constructor. It constructs an object using Rowkeys.

public void addFile(String fileName)

Specifies the file to be returned.

public void addFiles(List<String> fileNames)

Specifies the files to be returned.

org.apache.hadoop.hbase.filestream.client.FSResult inherits from org.apache.hadoop.hbase.Result. The following APIs are added:

Method

Description

public FSFile getFile(String fileName)

Returns the FSFile object whose file name is specified from the query results.

org.apache.hadoop.hbase.filestream.client.FSFile API:

Method

Description

public InputStream createInputStream()

Obtains the input stream object from the FSFile object.

We use cookies to improve our site and your experience. By continuing to browse our site you accept our cookie policy. Find out more

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback