risdenk commented on a change in pull request #553: SOLR-9515: Update to Hadoop
3
URL: https://github.com/apache/lucene-solr/pull/553#discussion_r253096125
##########
File path: solr/core/src/test/org/apache/solr/cloud/hdfs/HdfsTestUtil.java
##########
@@ -239,4 +253,24 @@ public static String getURI(MiniDFSCluster dfsCluster) {
}
}
+ /**
+ * By default in JDK9+, the ForkJoinWorkerThreadFactory does not give
SecurityManager permissions
+ * to threads that are created. This works around that with a custom thread
factory.
+ * See SOLR-9515 and HDFS-14251
+ * Used in
org.apache.hadoop.hdfs.server.datanode.fsdataset.impl.BlockPoolSlice
+ */
+ public static class HDFSForkJoinThreadFactory implements
ForkJoinPool.ForkJoinWorkerThreadFactory {
+ @Override
+ public ForkJoinWorkerThread newThread(ForkJoinPool pool) {
+ ForkJoinWorkerThread worker = new SecurityManagerWorkerThread(pool);
+ worker.setName("solr-hdfs-threadpool-" + worker.getPoolIndex());
Review comment:
Name used in BadHdfsThreadFilter since this pool is not shutdown correctly
by BlockPoolSlice and not easily worked around. See SOLR-9515 and HDFS-14251
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]