SOLR-14021: Deprecate HDFS support

This commit is contained in:
Ishan Chattopadhyaya 2020-07-04 18:29:45 +05:30
parent 04d9b52b3f
commit c3d6a8bf7a
11 changed files with 45 additions and 1 deletions

View File

@ -447,6 +447,9 @@ Other Changes
* SOLR-14066: Data Import Handler is deprecated. It is scheduled to be removed as of 9.0 and a community supported
package for the same may now be used instead. (Ishan Chattopadhyaya, janhoy)
* SOLR-14021: HDFS support is deprecated. It is scheduled to be removed as of 9.0. Please see JIRA for more details.
(Joel Bernstein, Ishan Chattopadhyaya)
* SOLR-14603: Upgrade Restlet to 2.4.3 (marcussorealheis)
================== 8.5.2 ==================

View File

@ -71,6 +71,10 @@ import org.slf4j.LoggerFactory;
import static org.apache.hadoop.fs.CommonConfigurationKeysPublic.HADOOP_SECURITY_AUTHENTICATION;
/**
* @deprecated since 8.6
*/
@Deprecated
public class HdfsDirectoryFactory extends CachingDirectoryFactory implements SolrCoreAware, SolrMetricProducer {
private static final Logger log = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());

View File

@ -22,6 +22,7 @@ import java.io.OutputStream;
import java.net.URI;
import java.net.URISyntaxException;
import java.util.Objects;
import java.lang.invoke.MethodHandles;
import com.google.common.base.Preconditions;
import org.apache.hadoop.conf.Configuration;
@ -40,8 +41,16 @@ import org.apache.solr.core.DirectoryFactory;
import org.apache.solr.core.HdfsDirectoryFactory;
import org.apache.solr.store.hdfs.HdfsDirectory;
import org.apache.solr.store.hdfs.HdfsDirectory.HdfsIndexInput;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
* @deprecated since 8.6
*/
@Deprecated
public class HdfsBackupRepository implements BackupRepository {
private static final Logger log = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
private static final String HDFS_UMASK_MODE_PARAM = "solr.hdfs.permissions.umask-mode";
private static final String HDFS_COPY_BUFFER_SIZE_PARAM = "solr.hdfs.buffer.size";
@ -58,6 +67,8 @@ public class HdfsBackupRepository implements BackupRepository {
public void init(NamedList args) {
this.config = args;
log.warn("HDFS support in Solr has been deprecated as of 8.6. See SOLR-14021 for details.");
// Configure the size of the buffer used for copying index files to/from HDFS, if specified.
if (args.get(HDFS_COPY_BUFFER_SIZE_PARAM) != null) {
this.copyBufferSize = (Integer)args.get(HDFS_COPY_BUFFER_SIZE_PARAM);

View File

@ -44,6 +44,11 @@ import org.apache.solr.store.blockcache.CustomBufferedIndexInput;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
* @deprecated since 8.6
*/
@Deprecated
public class HdfsDirectory extends BaseDirectory {
private static final Logger log = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
public static final int DEFAULT_BUFFER_SIZE = 4096;
@ -97,6 +102,7 @@ public class HdfsDirectory extends BaseDirectory {
org.apache.solr.common.util.IOUtils.closeQuietly(fileSystem);
throw new RuntimeException("Problem creating directory: " + hdfsDirPath, e);
}
log.warn("HDFS support in Solr has been deprecated as of 8.6. See SOLR-14021 for details.");
}
@Override

View File

@ -30,7 +30,9 @@ import org.apache.lucene.store.OutputStreamIndexOutput;
/**
* @lucene.experimental
* @deprecated since 8.6
*/
@Deprecated
public class HdfsFileWriter extends OutputStreamIndexOutput {
public static final String HDFS_SYNC_BLOCK = "solr.hdfs.sync.block";

View File

@ -35,6 +35,10 @@ import org.apache.solr.metrics.SolrMetricsContext;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
* @deprecated since 8.6
*/
@Deprecated
public class HdfsLocalityReporter implements SolrInfoBean {
public static final String LOCALITY_BYTES_TOTAL = "locality.bytes.total";
public static final String LOCALITY_BYTES_LOCAL = "locality.bytes.local";

View File

@ -34,6 +34,10 @@ import org.apache.solr.common.util.IOUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
* @deprecated since 8.6
*/
@Deprecated
public class HdfsLockFactory extends LockFactory {
private static final Logger log = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());

View File

@ -57,7 +57,9 @@ import org.slf4j.LoggerFactory;
* This would also allow to not log document data for requests with commit=true
* in them (since we know that if the request succeeds, all docs will be committed)
*
* @deprecated since 8.6
*/
@Deprecated
public class HdfsTransactionLog extends TransactionLog {
private static final Logger log = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
private static boolean debug = log.isDebugEnabled();

View File

@ -42,7 +42,11 @@ import org.apache.solr.util.HdfsUtil;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/** @lucene.experimental */
/**
* @lucene.experimental
* @deprecated since 8.6
*/
@Deprecated
public class HdfsUpdateLog extends UpdateLog {
private final Object fsLock = new Object();

View File

@ -16,6 +16,8 @@
// specific language governing permissions and limitations
// under the License.
WARNING: HDFS support in Solr is deprecated as of 8.6 and maybe be removed in 9.0. See SOLR-14021 for details.
Solr has support for writing and reading its index and transaction log files to the HDFS distributed filesystem.
This does not use Hadoop MapReduce to process Solr data, rather it only uses the HDFS filesystem for index and transaction log file storage.

View File

@ -99,6 +99,8 @@ Windows SMB shares on the UNC format, such as `\\myhost\myshare\mypath` are now
* Data Import Handler is deprecated and is scheduled to be removed in 9.0. A community supported version of this may be available as an external package to be used with the package management system. For more details, please refer to SOLR-14066.
* HDFS support in Solr is deprecated and is scheduled to be removed in 9.0. A community supported version of this may be available as an external package to be used with the package management system. For more details, please refer to SOLR-14021.
=== Solr 8.5
See the https://cwiki.apache.org/confluence/display/SOLR/ReleaseNote85[8.5 Release Notes]