searchableAttributes = new ArrayList<>();
private boolean compress = true;
private boolean alwaysSync = false;
- private int queryThreadPoolSize = 1;
+ private int queryThreadPoolSize = 2;
+ private int indexThreadPoolSize = 1;
private boolean allowRollover = true;
public void setAllowRollover(final boolean allow) {
@@ -203,6 +204,20 @@ public class RepositoryConfiguration {
this.queryThreadPoolSize = queryThreadPoolSize;
}
+ /**
+ * @return the number of threads to use to index provenance events
+ */
+ public int getIndexThreadPoolSize() {
+ return indexThreadPoolSize;
+ }
+
+ public void setIndexThreadPoolSize(final int indexThreadPoolSize) {
+ if (indexThreadPoolSize < 1) {
+ throw new IllegalArgumentException();
+ }
+ this.indexThreadPoolSize = indexThreadPoolSize;
+ }
+
/**
*
* Specifies the desired size of each Provenance Event index shard, in
@@ -213,22 +228,21 @@ public class RepositoryConfiguration {
*
* A very large index requires a significant amount of Java heap space to
* search. As the size of the shard increases, the required Java heap space
- * also increases.
- *
+ * also increases.
*
* By having multiple shards, we have the ability to use multiple concurrent
* threads to search the individual shards, resulting in far less latency
- * when performing a search across millions or billions of records.
- *
+ * when performing a search across millions or billions of records.
*
* We keep track of which time ranges each index shard spans. As a result,
* we are able to determine which shards need to be searched if a search
* provides a date range. This can greatly increase the speed of a search
- * and reduce resource utilization.
- *
+ * and reduce resource utilization.
*
*
- * @param bytes the number of bytes to write to an index before beginning a new shard
+ * @param bytes
+ * the number of bytes to write to an index before beginning a
+ * new shard
*/
public void setDesiredIndexSize(final long bytes) {
this.desiredIndexBytes = bytes;