Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [geomesa-users] 1.2.7 to 1.3.0 - Changes to AccumuloDataStoreConfig and AccumuloDataStore

Hi Dave,

In general you shouldn't need to create the data store directly. Instead, use the DataStoreFinder with a map of input parameters. These parameters haven't changed, and are generally more stable.

The bare minimum needed is shown here, with more advanced options directly below:

http://www.geomesa.org/documentation/user/accumulo/usage.html#creating-a-data-store

Thanks,

Emilio

On 03/09/2017 04:16 PM, Dave Boyd wrote:

All:

   Trying to refactor some code to work with GeoMesa 1.3.0 (or newer).   There
were changes in how one set up an AccumuloDataStoreConfig and AccumuloDataStore
(a lot of the parameters moved around).   

What has me completely stumped (due most likely to my weak Java Foo) is the parameter
to the AccumuloDataStoreConfig for the audit option implementations to audit queries.

NOTE - Don't want to audit queries so a null should be allowed to work here but it doesn't.
I get a scala.MatchError: (null,None) (of class scala.Tuple2)

In any case I can't get the syntax for the Option<Tuple3<AuditWriter, AuditProvider, String>> to
work.  I can't find an example of other than a MockAuditWriter in the Scala unit tests.   What class
needs to be instantiated for that portion of the options?
I have tried instantiating a Some object for the Tuple but can't seem to find the correct incantation for
that.

More Java examples of these things would be very helpful.

Below is my code (does not compile), any help would be appreciated.

                AuthorizationsProvider authProvider = new DefaultAuthorizationsProvider();

                AuditProvider auditProvider = new ParamsAuditProvider();
               AuditWriter auditWriter = new AuditWriter();
                
                Option<Tuple3<AuditWriter, AuditProvider, String>> auditOptions =
                    {{ auditWriter, auditProvider, ""}};
                
                 String defaultVisibilities = "";

                Option<Object> queryTimeout = new Some<Object>(2000l);

                int queryThreads = 1;
                int recordThreads = 1;
                int writeThreads = 1;
                boolean generateStats = false;
                boolean collectUsageStats = false;
                boolean caching = false;
                boolean looseBBox = false;
                /**
                 * Configuration options for AccumuloDataStore
                 *
                 * @param catalog table in Accumulo used to store feature type metadata
                 * @param defaultVisibilities default visibilities applied to any data written
                 * @param generateStats write stats on data during ingest
                 * @param authProvider provides the authorizations used to access data
                 * @param audit optional implementations to audit queries
                 * @param queryTimeout optional timeout (in millis) before a long-running query will be terminated
                 * @param looseBBox sacrifice some precision for speed
                 * @param caching cache feature results - WARNING can use large amounts of memory
                 * @param writeThreads numer of threads used for writing
                 * @param queryThreads number of threads used per-query
                 * @param recordThreads number of threads used to join against the record table. Because record scans
                 *                      are single-row ranges, increasing this too much can cause performance to decrease

                 */
                
                AccumuloDataStoreConfig config = new AccumuloDataStoreConfig(coalesceSearchTable,
                                                                             defaultVisibilities,
                                                                             true,
                                                                             authProvider,
                                                                              auditOptions,
                                                                             queryTimeout,
                                                                             looseBBox,
                                                                             caching,
                                                                             writeThreads,
                                                                             queryThreads,
                                                                             recordThreads);

                dataStore = new AccumuloDataStore(connector,
                                                   config);




_______________________________________________
geomesa-users mailing list
geomesa-users@xxxxxxxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.locationtech.org/mailman/listinfo/geomesa-users


Back to the top