20.3. Using the FileSystem Data Store Programmatically¶
20.3.1. Creating a Data Store¶
An instance of a FileSystem data store can be obtained through the normal GeoTools discovery methods, assuming that the GeoMesa code is on the classpath:
Map<String, String> parameters = new HashMap<>;
parameters.put("fs.path", "hdfs://localhost:9000/fs-root/");
org.geotools.data.DataStore dataStore = org.geotools.data.DataStoreFinder.getDataStore(parameters);
More information on using GeoTools can be found in the GeoTools user guide.
20.3.2. FileSystem Data Store Parameters¶
The FileSystem data store takes several parameters (required parameters are marked with *
):
Parameter |
Type |
Description |
---|---|---|
|
String |
The root path to write and read data from (e.g. s3a://mybucket/datastores/testds) |
|
String |
The file encoding used when creating a new schema. If not specified here, it must
be configured with |
|
Int |
The number of threads used for queries |
|
String |
Timeout for closing a partition file after write, e.g. ‘60 seconds’. This is to prevent too many open files during large write operations. |
|
String |
Additional Hadoop configuration resource files (comma-delimited) |
|
String |
Additional Hadoop configuration properties, as a standard XML |