YMatrix
Quick Start
Cluster Deployment
Data Model
Data Writing
Data Query
SQL Reference
Maintenance and Monitoring
Tool Guide
Troubleshooting
FAQ
This document describes PXF-related frequently asked questions.
After PXF deployment, an error is reported when accessing HDFS:
remote component error,Failed connect to localhost:5888; Connection refused (libchurl.c:950)
Solution
pxf/servers/core-site.xml and hdfs-site.xml
must be the same as the Hadoop configuration file.pxf/servers/core-site.xml
configure user access rights.pxf/core-site.xml
.Solution
escape 'off'
to the option.format 'text:multi'
.OK.
Prerequisites
PXF can access S3 normally.
Solution
Copy the aa.csv
file and name it ab.csv
and upload it to bucket. The file path is ymatrix/test
. Currently, the ymatrix/test
files have aa.csv
and ab.csv
. The number of data strips in ymatrix/test
are 1,000.
DROP FOREIGN TABLE public.chen_test ;
CREATE FOREIGN TABLE public.chen_test (
c1 text,
c2 text,
c3 text
)
SERVER s3server_online
OPTIONS (
format 'csv',
resource 'ymatrix/test/a*.csv',
JSONIFY_ARRAY 'TRUE',
JSONIFY_MAP 'TRUE',
JSONIFY_RECORD 'TRUE'
);
SELECT count(*) FROM chen_test ;
count
-------
2000
(1 row)
Use the wildcard *
to recurse all files in all subdirectories under a directory.
Note! The file format that can be matched by wildcard characters must be the same, otherwise an error will be reported.
OK.
When files in TEXT
, CSV
, PARQUET
, and JSON
formats are automatically sliced according to the size of 128MB
slice and read in parallel by the corresponding segment according to the slice.