SOLR-8857: HdfsUpdateLog does not use configured or new default number of version buckets and is hard coded to 256.

This commit is contained in:
markrmiller 2016-03-21 14:10:03 -04:00
parent 04bd586071
commit 93e96f688e
2 changed files with 6 additions and 10 deletions

View File

@ -55,6 +55,9 @@ New Features
Bug Fixes Bug Fixes
---------------------- ----------------------
* SOLR-8857: HdfsUpdateLog does not use configured or new default number of version buckets and is
hard coded to 256. (Mark Miller, yonik, Gregory Chanan)
Optimizations Optimizations
---------------------- ----------------------
* SOLR-8722: Don't force a full ZkStateReader refresh on every Overseer operation. * SOLR-8722: Don't force a full ZkStateReader refresh on every Overseer operation.

View File

@ -97,19 +97,12 @@ public class HdfsUpdateLog extends UpdateLog {
@Override @Override
public void init(PluginInfo info) { public void init(PluginInfo info) {
dataDir = (String) info.initArgs.get("dir"); super.init(info);
defaultSyncLevel = SyncLevel.getSyncLevel((String) info.initArgs
.get("syncLevel"));
numRecordsToKeep = objToInt(info.initArgs.get("numRecordsToKeep"), 100);
maxNumLogsToKeep = objToInt(info.initArgs.get("maxNumLogsToKeep"), 10);
tlogDfsReplication = (Integer) info.initArgs.get( "tlogDfsReplication"); tlogDfsReplication = (Integer) info.initArgs.get( "tlogDfsReplication");
if (tlogDfsReplication == null) tlogDfsReplication = 3; if (tlogDfsReplication == null) tlogDfsReplication = 3;
log.info("Initializing HdfsUpdateLog: dataDir={} defaultSyncLevel={} numRecordsToKeep={} maxNumLogsToKeep={} tlogDfsReplication={}", log.info("Initializing HdfsUpdateLog: tlogDfsReplication={}", tlogDfsReplication);
dataDir, defaultSyncLevel, numRecordsToKeep, maxNumLogsToKeep, tlogDfsReplication);
} }
private Configuration getConf() { private Configuration getConf() {
@ -231,7 +224,7 @@ public class HdfsUpdateLog extends UpdateLog {
} }
try { try {
versionInfo = new VersionInfo(this, 256); versionInfo = new VersionInfo(this, numVersionBuckets);
} catch (SolrException e) { } catch (SolrException e) {
log.error("Unable to use updateLog: " + e.getMessage(), e); log.error("Unable to use updateLog: " + e.getMessage(), e);
throw new SolrException(SolrException.ErrorCode.SERVER_ERROR, throw new SolrException(SolrException.ErrorCode.SERVER_ERROR,