Repository: asterixdb Updated Branches: refs/heads/master d6181c1e8 -> 9267168f7
ASTERIXDB-1711: rename asterix_transaction_log - s/asterix_transaction_log/transaction_log/ - update storage version - remove some dead code Change-Id: Ieed464a1993a6bbff798e18e4c94245755a447eb Reviewed-on: https://asterix-gerrit.ics.uci.edu/1368 Sonar-Qube: Jenkins <jenk...@fulliautomatix.ics.uci.edu> Tested-by: Jenkins <jenk...@fulliautomatix.ics.uci.edu> Integration-Tests: Jenkins <jenk...@fulliautomatix.ics.uci.edu> Reviewed-by: Michael Blow <mb...@apache.org> Project: http://git-wip-us.apache.org/repos/asf/asterixdb/repo Commit: http://git-wip-us.apache.org/repos/asf/asterixdb/commit/9267168f Tree: http://git-wip-us.apache.org/repos/asf/asterixdb/tree/9267168f Diff: http://git-wip-us.apache.org/repos/asf/asterixdb/diff/9267168f Branch: refs/heads/master Commit: 9267168f78be7faa1c0af495f83fa3eba07ecda5 Parents: d6181c1 Author: Till Westmann <ti...@apache.org> Authored: Tue Dec 13 09:36:21 2016 -0800 Committer: Till Westmann <ti...@apache.org> Committed: Tue Dec 13 13:21:34 2016 -0800 ---------------------------------------------------------------------- .../transactions/LogManagerProperties.java | 19 +++---------------- .../src/main/resources/configs/local.xml | 6 +++--- .../am/common/api/ITreeIndexMetaDataFrame.java | 4 ++-- 3 files changed, 8 insertions(+), 21 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/asterixdb/blob/9267168f/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/transactions/LogManagerProperties.java ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/transactions/LogManagerProperties.java b/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/transactions/LogManagerProperties.java index 083ccf6..c64bd4a 100644 --- a/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/transactions/LogManagerProperties.java +++ b/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/transactions/LogManagerProperties.java @@ -27,32 +27,26 @@ public class LogManagerProperties implements Serializable { private static final long serialVersionUID = 2084227360840799662L; public static final String lineSeparator = System.getProperty("line.separator"); - public static final int LOG_MAGIC_NUMBER = 123456789; - public static final String LOG_DIR_SUFFIX = ".txnLogDir"; - private static final String DEFAULT_LOG_FILE_PREFIX = "asterix_transaction_log"; + private static final String DEFAULT_LOG_FILE_PREFIX = "transaction_log"; // follow the naming convention <logFilePrefix>_<number> where number starts from 0 private final String logFilePrefix; private final String logDir; - public String logDirKey; // number of log pages in the log buffer private final int logPageSize; // number of log pages in the log buffer. private final int numLogPages; - // logBufferSize = logPageSize * numLogPages; - private final int logBufferSize; // maximum size of each log file private final long logPartitionSize; public LogManagerProperties(AsterixTransactionProperties txnProperties, String nodeId) { - this.logDirKey = new String(nodeId + LOG_DIR_SUFFIX); this.logPageSize = txnProperties.getLogBufferPageSize(); this.numLogPages = txnProperties.getLogBufferNumPages(); long logPartitionSize = txnProperties.getLogPartitionSize(); this.logDir = txnProperties.getLogDirectory(nodeId); this.logFilePrefix = DEFAULT_LOG_FILE_PREFIX; - this.logBufferSize = logPageSize * numLogPages; + int logBufferSize = logPageSize * numLogPages; //make sure that the log partition size is the multiple of log buffer size. this.logPartitionSize = (logPartitionSize / logBufferSize) * logBufferSize; } @@ -77,14 +71,7 @@ public class LogManagerProperties implements Serializable { return numLogPages; } - public int getLogBufferSize() { - return logBufferSize; - } - - public String getLogDirKey() { - return logDirKey; - } - + @Override public String toString() { StringBuilder builder = new StringBuilder(); builder.append("log_dir_ : " + logDir + lineSeparator); http://git-wip-us.apache.org/repos/asf/asterixdb/blob/9267168f/asterixdb/asterix-yarn/src/main/resources/configs/local.xml ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-yarn/src/main/resources/configs/local.xml b/asterixdb/asterix-yarn/src/main/resources/configs/local.xml index 76979b8..c026aef 100644 --- a/asterixdb/asterix-yarn/src/main/resources/configs/local.xml +++ b/asterixdb/asterix-yarn/src/main/resources/configs/local.xml @@ -21,13 +21,13 @@ <!-- Name of the cluster --> <name>local</name> - <log_dir>/tmp/</log_dir> - <txn_log_dir>/tmp/</txn_log_dir> + <log_dir>/tmp/asterix-yarn/</log_dir> + <txn_log_dir>/tmp/asterix-yarn/</txn_log_dir> <!-- Mount point of an iodevice. Use a comma separated list for a machine that has multiple iodevices (disks). This property can be overriden for a node by redefining at the node level. --> - <iodevices>/tmp</iodevices> + <iodevices>/tmp/asterix-yarn</iodevices> <!-- Path on each iodevice where Asterix will store its data --> <store>storage</store> http://git-wip-us.apache.org/repos/asf/asterixdb/blob/9267168f/hyracks-fullstack/hyracks/hyracks-storage-am-common/src/main/java/org/apache/hyracks/storage/am/common/api/ITreeIndexMetaDataFrame.java ---------------------------------------------------------------------- diff --git a/hyracks-fullstack/hyracks/hyracks-storage-am-common/src/main/java/org/apache/hyracks/storage/am/common/api/ITreeIndexMetaDataFrame.java b/hyracks-fullstack/hyracks/hyracks-storage-am-common/src/main/java/org/apache/hyracks/storage/am/common/api/ITreeIndexMetaDataFrame.java index 21e918d..653f6ae 100644 --- a/hyracks-fullstack/hyracks/hyracks-storage-am-common/src/main/java/org/apache/hyracks/storage/am/common/api/ITreeIndexMetaDataFrame.java +++ b/hyracks-fullstack/hyracks/hyracks-storage-am-common/src/main/java/org/apache/hyracks/storage/am/common/api/ITreeIndexMetaDataFrame.java @@ -23,9 +23,9 @@ import org.apache.hyracks.storage.common.buffercache.ICachedPage; public interface ITreeIndexMetaDataFrame { - //Storage version #. Change this if you alter any tree frame formats to stop + // Storage version #. Change this if you alter any tree frame formats to stop // possible corruption from old versions reading new formats. - public static final int VERSION = 3; + int VERSION = 4; public void initBuffer(byte level);