disable debugging checks
fix LockManagerDeterministicUnitTest
some cleanup
diff --git a/asterix-app/src/main/resources/asterix-build-configuration.xml b/asterix-app/src/main/resources/asterix-build-configuration.xml
index af95437..d798cd5 100644
--- a/asterix-app/src/main/resources/asterix-build-configuration.xml
+++ b/asterix-app/src/main/resources/asterix-build-configuration.xml
@@ -36,7 +36,6 @@
<property>
<name>log.level</name>
- <!-- ><value>INFO</value> -->
<value>WARNING</value>
<description>Log level for running tests/build</description>
</property>
diff --git a/asterix-transactions/pom.xml b/asterix-transactions/pom.xml
index 5e6b741..27a1de4 100644
--- a/asterix-transactions/pom.xml
+++ b/asterix-transactions/pom.xml
@@ -38,7 +38,7 @@
<artifactId>record-manager-generator-maven-plugin</artifactId>
<version>0.8.4-SNAPSHOT</version>
<configuration>
- <debug>true</debug>
+ <debug>false</debug>
<inputFiles>
<param>src/main/java/edu/uci/ics/asterix/transaction/management/service/locking/Job.json</param>
<param>src/main/java/edu/uci/ics/asterix/transaction/management/service/locking/Resource.json</param>
diff --git a/asterix-transactions/src/main/java/edu/uci/ics/asterix/transaction/management/service/locking/ConcurrentLockManager.java b/asterix-transactions/src/main/java/edu/uci/ics/asterix/transaction/management/service/locking/ConcurrentLockManager.java
index 6d310f3..d955ab2 100644
--- a/asterix-transactions/src/main/java/edu/uci/ics/asterix/transaction/management/service/locking/ConcurrentLockManager.java
+++ b/asterix-transactions/src/main/java/edu/uci/ics/asterix/transaction/management/service/locking/ConcurrentLockManager.java
@@ -676,7 +676,7 @@
}
}
- private long removeLastHolder(long resource, long jobSlot, byte lockMode) throws ACIDException {
+ private long removeLastHolder(long resource, long jobSlot, byte lockMode) {
long holder = resArenaMgr.getLastHolder(resource);
if (holder < 0) {
throw new IllegalStateException("no holder for resource " + resource);
diff --git a/asterix-transactions/src/main/java/edu/uci/ics/asterix/transaction/management/service/locking/LockManagerDeterministicUnitTest.java b/asterix-transactions/src/main/java/edu/uci/ics/asterix/transaction/management/service/locking/LockManagerDeterministicUnitTest.java
index 8f3e6df..bd05983 100644
--- a/asterix-transactions/src/main/java/edu/uci/ics/asterix/transaction/management/service/locking/LockManagerDeterministicUnitTest.java
+++ b/asterix-transactions/src/main/java/edu/uci/ics/asterix/transaction/management/service/locking/LockManagerDeterministicUnitTest.java
@@ -24,7 +24,6 @@
import org.apache.commons.io.FileUtils;
-import edu.uci.ics.asterix.common.api.AsterixThreadExecutor;
import edu.uci.ics.asterix.common.config.AsterixPropertiesAccessor;
import edu.uci.ics.asterix.common.config.AsterixTransactionProperties;
import edu.uci.ics.asterix.common.exceptions.ACIDException;
@@ -70,7 +69,7 @@
long defaultWaitTime;
public LockRequestController(String requestFileName) throws ACIDException, AsterixException {
- this.txnProvider = new TransactionSubsystem("nc1", null, new AsterixTransactionProperties(
+ this.txnProvider = new TransactionSubsystem("nc1", new TestRuntimeContextProvider(), new AsterixTransactionProperties(
new AsterixPropertiesAccessor()));
this.workerReadyQueue = new WorkerReadyQueue();
this.requestList = new ArrayList<LockRequest>();
diff --git a/asterix-transactions/src/main/java/edu/uci/ics/asterix/transaction/management/service/locking/TestRuntimeContextProvider.java b/asterix-transactions/src/main/java/edu/uci/ics/asterix/transaction/management/service/locking/TestRuntimeContextProvider.java
new file mode 100644
index 0000000..cf519ea
--- /dev/null
+++ b/asterix-transactions/src/main/java/edu/uci/ics/asterix/transaction/management/service/locking/TestRuntimeContextProvider.java
@@ -0,0 +1,139 @@
+/*
+ * Copyright 2014 by The Regents of the University of California
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * you may obtain a copy of the License from
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package edu.uci.ics.asterix.transaction.management.service.locking;
+
+import java.util.List;
+import java.util.concurrent.Executors;
+
+import edu.uci.ics.asterix.common.api.AsterixThreadExecutor;
+import edu.uci.ics.asterix.common.api.IAsterixAppRuntimeContext;
+import edu.uci.ics.asterix.common.transactions.IAsterixAppRuntimeContextProvider;
+import edu.uci.ics.asterix.common.transactions.ITransactionSubsystem;
+import edu.uci.ics.hyracks.api.exceptions.HyracksDataException;
+import edu.uci.ics.hyracks.api.io.IIOManager;
+import edu.uci.ics.hyracks.storage.am.common.api.IIndex;
+import edu.uci.ics.hyracks.storage.am.common.api.IIndexLifecycleManager;
+import edu.uci.ics.hyracks.storage.am.lsm.common.api.ILSMIOOperationScheduler;
+import edu.uci.ics.hyracks.storage.am.lsm.common.api.ILSMOperationTracker;
+import edu.uci.ics.hyracks.storage.am.lsm.common.api.IVirtualBufferCache;
+import edu.uci.ics.hyracks.storage.common.buffercache.IBufferCache;
+import edu.uci.ics.hyracks.storage.common.file.IFileMapProvider;
+import edu.uci.ics.hyracks.storage.common.file.ILocalResourceRepository;
+import edu.uci.ics.hyracks.storage.common.file.ResourceIdFactory;
+
+class TestRuntimeContextProvider implements IAsterixAppRuntimeContextProvider {
+
+ AsterixThreadExecutor ate = new AsterixThreadExecutor(Executors.defaultThreadFactory());
+ IIndexLifecycleManager ilm = new IndexLifecycleManager();
+
+ @Override
+ public AsterixThreadExecutor getThreadExecutor() {
+ return ate;
+ }
+
+ @Override
+ public IBufferCache getBufferCache() {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public IFileMapProvider getFileMapManager() {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public ITransactionSubsystem getTransactionSubsystem() {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public IIndexLifecycleManager getIndexLifecycleManager() {
+ return ilm;
+ }
+
+ @Override
+ public double getBloomFilterFalsePositiveRate() {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public ILSMOperationTracker getLSMBTreeOperationTracker(int datasetID) {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public ILSMIOOperationScheduler getLSMIOScheduler() {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public ILocalResourceRepository getLocalResourceRepository() {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public ResourceIdFactory getResourceIdFactory() {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public IIOManager getIOManager() {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public List<IVirtualBufferCache> getVirtualBufferCaches(int datasetID) {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public IAsterixAppRuntimeContext getAppContext() {
+ throw new UnsupportedOperationException();
+ }
+
+ static class IndexLifecycleManager implements IIndexLifecycleManager {
+
+ @Override
+ public IIndex getIndex(long resourceID) throws HyracksDataException {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public void register(long resourceID, IIndex index) throws HyracksDataException {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public void unregister(long resourceID) throws HyracksDataException {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public void open(long resourceID) throws HyracksDataException {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public void close(long resourceID) throws HyracksDataException {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public List<IIndex> getOpenIndexes() {
+ throw new UnsupportedOperationException();
+ }
+
+ }
+}
\ No newline at end of file