Skip to content
This repository has been archived by the owner on Nov 14, 2024. It is now read-only.

Commit

Permalink
merge develop into atlasdb perf cli branch (#828)
Browse files Browse the repository at this point in the history
* Update release-notes.rst

* pgdev disallows printStackTrace

* Fix broken link in docs

* Use try-with-resources

* Nit: use single-element ImmutableSet for clarity

* SweepTaskRunnerImpl.getTimestampsToSweep: minor refactor

* 0.11.0 release notes edits

* Add ETE test for Atlas configured with no leader

* Remove wrong config value from ETE tests

* Refactor out on-demand loading and add tests for it. Clean-up files, convert/refactor tests to assertJ

* Switch error to warn since it isn't actually an error

* Rename SweepStrategySweeper to StrategySweeper

* Get rid of NOTHING shortcut (essentially the same atm)

* Make timestamp test work with all KVSes

* Add release notes

* Make test more consistent for DB KVS

* StrategySweeper -> Sweeper, new test to maker sure we don't call the kvs when there aren't any rows to sweep

* Get rid of Sweep at the beginning of two classes

* Log messages should use AtlasDB

* move to next release

* Fix weird compile error

* Remove bad optional.absent check

* Update circle.yml to include container-logs in artifacts

* Add split out logs for ETE tests

* 0.11.1 release note

* release notes for 0.11.2

* Add CassandraServerVersion with tests

* 0.11.3 release notes

* Update release-notes.rst

* Test for cassandra duplicate table creation bug

* Change the copyright header to use the regular one

* Passwords should not be output in generated toString() methods

Prevents an issue seen where a stack trace helpfully tries to print the
config but also prints the password to the log files.

Updated copyright of all modified classes to 2016.

* Bump version

* dont log loading a tracing prefs that isn't enabled

at some point we started shipping an example prefs file
that always gets loaded, so you get this 'error' message
at startup by default now.

* cleanup temp tables

Necessary for a corresponding internal change.
The general gist is open atlas never wanted this application-specific garbage anyways,
so I've mostly removed it here and made it so someone can just implement an interface.

Real reason for all of this is that we're moving to lazily initialized temp tables
because postgres' rubbish temp table creation speeds screw with Hikari pool resizing,
among other things.

* Switch to DockerComposeRule instead of DockerComposition

* Switch to DockerComposeRule instead of DockerComposition for TimelockServer

* Switch to DockerComposeRule instead of DockerComposition for EteSetup

* Switch to DockerComposeRule instead of DockerComposition for DbkvsTestSuite

* Adding diagnostics, as per Oracle Support

* Rename composeRule -> docker, per naming convention in DCR example code

* Add entry in ValueTypes table for UUID

A UUID is just two longs (a 16-byte value). We encode them as big-endian, so range scans are supported.

* Clean up explanation for VAR_LONG and VAR_SIGNED_LONG

* Reword introductory paragraph

* Update release notes for PR #755.

* Add advice for contributing code

* Add explanation about FIXED_LONG_LITTLE_ENDIAN

* Use footnotes because they're prettier

* Fix typos in contribution guidelines

* don't always log sql errors

especially ones that are expected errors / caller logic is set up to deal with the failure.

Fixes #709

* Add comment explaining the version

* Clean up tests

* Switch to shared static logger

* Adjust table widths so the footnotes don't spill over

* Add additional logging

* Unused imports

* ssl: false should override the presence of an SslConfiguration

We want to add a default SslConfiguration to our internal application.
However, users may have explicitly disabled Ssl for communication with
their Cassandra, which will be broken by the presence of the new block
overriding the `ssl()` param..

Despite being deprecated, the `ssl()` param should override the presence
of an ssl config, meaning that we can apply this without being a breaking
change.

* License

* Fix copy-paste error

* Upgrade checkstyle to 6.18

* Add .baseline files

* Remove a few of the checkstyle/findbugs. Change import order to match existing order. Change copyright notice to BSD-3. Auto-add copyright notice in IntelliJ

* Add baseline to the gradle files

* Enable checkstyle and findbugs report extraction in CircleCI

* CassandraTestSuite: Add a Classrule to ensure Cassandra images are created

* Switch from whitelisted projects to blacklisted projects

* Remove unused variable

* Clean up docker-compose

* CassandraSchemaLockTest: Automated test for detecting multiple table creation error

* Cleanup

* Add matchers to get better error messages

* Improve error messages

* Move the cassandra multinode test to a separate directory

* Revert copy-paste error

* Fix typo: SIGNED_VAR_LONG -> VAR_SIGNED_LONG

* Move checkstyle version into versions file, remove META-INF exclude, and add comment about why we have the findbugs excludes

* Ensure C* image is created before docker-compose

* Remove stray empty lines

* Prep and enable baseline for atlasdb-dropwizard-bundle

* Enable baseline for atlasdb-hikari

* Prep atlasdb-api for baseline

* Prep atlasdb-api tests for baseline

* Fix-up findbugs errors for atlasdb-api

* Enable baseline for atlasdb-api

* Run cassandra-multinode-tests in a separate container

* Create fromBoolean method in LockLeader enum

* Docs: cassandra_KVS_config should have more information on ssl and leader block.

* Improve the wording in docs

* Add release notes

* Upgrade to gradle 2.14.1 and jacoco to 0.7.7.201606060606. Fixes #767

* Revert "Test for cassandra duplicate table creation bug"

* Revert "Revert "Test for cassandra duplicate table creation bug""

* Add container logs directory

* Add .idea to .gitignore

* Move to package, blacklist

* Increase timeout

* Implement the timestamp dropwizard command

* Convert timestamp CLI dropwizard class into a generic one for all CLIs

* Fix checkstyle and similar

* Add temporary workaround for airlift/airline#51

* Convert leader blocks into TS/LOCK blocks

* Refactor configuration conversion and argument extraction out

* Add offline flag to CLIs

* Add offline support to console and propagate it through for CLIs

* Refector AtlasDbConfigs as part of #goldentime to play around with tell rather than ask code structure

* Update nullables and unused import

* Add missing copyright

* Revert "Update nullables and unused import"

This reverts commit 8ee3b4d.

* Revert "Refector AtlasDbConfigs as part of #goldentime to play around with tell rather than ask code structure"

This reverts commit 5248e3f.

* Parameterise TestTimestampCommand

* Further refactoring of timestamp command tests

* Implement some ETE dropwizard tests

* Refactor runCommand to take in a String

* Remove random generated files

* Add tests for AtlasDbCommandUtils

* Ignore dropwizard ETE tests until docker-compose-rule#95 is merged and a new version is tagged

* Added dropwizard bundle to release notes

* Clean-up some code, fix an EMPTY_NAMESPACE bug when serialising/deserialising

* Switch to docker run and re-enable tests

* Add @nullable to AtlasDbConfigs

* Set of minor modifications

* Set of minor modifications

* Annotate why we JsonIgnore onAcquireConnectionVisitor

* Add tests for AtlasDbCliCommand#getOptionTypesForCommandMetadata

* Refactor out addOptionToParser and add tests

* Refactor out serialisation command

* Fix-up checkstyle

* Move timestamp file clean up into method

* Add a new Leader configuration page

* Make timeout 2 minutes

* Fix checkstyle

* Use correct jacoco version

* Use assserThat from unit

* Refactor CassandraSchemaLockTest and cassandra yml

* Cleanup container logs

* Cleanup build.gradle

* Reduce timeout, extract CONTAINER_LOGS_DIRECTORY

* minor doc nits

* Prep atlasdb-dbkvs for baseline

* Prepare atlasdb-dbkvs for findbugs

* Enable baseline on atlasdb-dbkvs

* Remove @after method

* Increase timeout

* Remove dependencies on ete1 as this is causing hanging builds. Fixed in #793

* Newline for Ben

* Select the first leader according to alphabetical order to make sure lockCreator is deterministic.

* Add tests

* Fix CassandraConnectionTest by setting a valid quorumSize

* Add docs change

* Fix directory structure in atlasdb-impl-shared/src/test/java

* Add profiling KVS wrapper to default kvs startup, use same order as internal product

* Add necessary documentation for profiling kvs'

* Docs nit: add comma before "which"

* Add check to make sure it's possible to reach quorum

* Wait for DB start

* Prep atlasdb-impl-shared for baseline. Disable abbreviation checking in files with KV in their name.

* Prep atlasdb-impl-shared tests for baseline

* Get atlasdb-impl-shared and tests working with findbugs. Exclude DynamicPartitionMapImpl from synchronisation checks until later

* Enable baseline for atlasdb-impl-shared

* Code review fixes

* Rename atlasdb-server -> atlasdb-service, atlasdb-server-dropwizard -> atlasdb-service-server

* Add release notes

* Prep atlasdb-cassandra for baseline

* Fix-up some FindBugs for atlasdb-cassandra

* Enable baseline on atlasdb-cassandra

* Fix-up code review comments

* ignore eclipse generated stuff

* Reduce number of threads and timeout

* Expand title line and fix link to file

* Cleanup docs

* Docs changes

* Docs: Add link from Logging page to Enabling C* Tracing page.

* Docs: minor fixes, mostly capitalisation

* release notes edits for 0.12.0

* Rename link

* Check for unique key constraints when inserting tables into metadata

* Fix-up ETE dependencies so that we wait for the DB box to be created

* another atlas -> atlasdb

* Refactor DbkvsTestSuite so it runs more consistently locally

* Remove test that checks duplicate table names throws.

Cassandra doesn't throw, so we shouldn't really either

* fix index.rst pages

* edit breaking change note

* final 0.12.0 release notes nits

* Convert findbugs annotation version to a constant

* Prep atlasdb-config for baseline

* Enable baseline for atlasdb-config

* Move release notes to right version

* publish test artifacts

* move atlas dagger instantiation into its own project (#816)

* move atlas dagger instantiation into its own project

* fix checkstyle failures

* rename atlasdb-server to atlasdb-service

* rename atlasdb-core to atlasdb-dagger

* remove extraneous test.sh
  • Loading branch information
rjullman authored Aug 23, 2016
1 parent 778d75a commit 6d3208d
Show file tree
Hide file tree
Showing 29 changed files with 134 additions and 59 deletions.
5 changes: 1 addition & 4 deletions atlasdb-cli/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,15 @@ mainClassName = 'com.palantir.atlasdb.cli.AtlasCli'
applicationName = 'atlasdb'

dependencies {
compile project(':atlasdb-service')
compile project(':atlasdb-impl-shared')
compile project(':atlasdb-dagger')
compile 'io.airlift:airline:0.7'
compile 'com.google.dagger:dagger:2.0.2'

runtime project(':atlasdb-cassandra')
runtime project(':atlasdb-rocksdb')

testCompile project(':atlasdb-rocksdb')

processor 'com.google.dagger:dagger-compiler:2.0.2'
processor 'org.immutables:value:' + libVersions.immutables
}

configurations.matching({ it.name in ['compile', 'runtime'] }).all {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,15 @@
import com.google.common.base.Suppliers;
import com.google.common.collect.ImmutableMap;
import com.google.common.collect.ImmutableSet;
import com.palantir.atlasdb.cli.services.AtlasDbServices;
import com.palantir.atlasdb.cli.services.DaggerAtlasDbServices;
import com.palantir.atlasdb.cli.services.ServicesConfigModule;
import com.palantir.atlasdb.config.AtlasDbConfigs;
import com.palantir.atlasdb.keyvalue.api.Namespace;
import com.palantir.atlasdb.keyvalue.api.TableReference;
import com.palantir.atlasdb.schema.KeyValueServiceMigrator;
import com.palantir.atlasdb.schema.KeyValueServiceValidator;
import com.palantir.atlasdb.schema.TaskProgress;
import com.palantir.atlasdb.services.AtlasDbServices;
import com.palantir.atlasdb.services.DaggerAtlasDbServices;
import com.palantir.atlasdb.services.ServicesConfigModule;
import com.palantir.common.base.Throwables;

import io.airlift.airline.Command;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@

import com.google.common.annotations.VisibleForTesting;
import com.google.common.base.Preconditions;
import com.palantir.atlasdb.cli.services.AtlasDbServices;
import com.palantir.atlasdb.cli.services.AtlasDbServicesFactory;
import com.palantir.atlasdb.cli.services.DaggerAtlasDbServices;
import com.palantir.atlasdb.cli.services.ServicesConfigModule;
import com.palantir.atlasdb.services.AtlasDbServices;
import com.palantir.atlasdb.services.AtlasDbServicesFactory;
import com.palantir.atlasdb.services.DaggerAtlasDbServices;
import com.palantir.atlasdb.services.ServicesConfigModule;
import com.palantir.common.base.Throwables;

public abstract class SingleBackendCommand extends AbstractCommand {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@
import com.google.common.collect.Sets;
import com.google.common.io.BaseEncoding;
import com.palantir.atlasdb.AtlasDbConstants;
import com.palantir.atlasdb.cli.services.AtlasDbServices;
import com.palantir.atlasdb.keyvalue.api.SweepResults;
import com.palantir.atlasdb.keyvalue.api.TableReference;
import com.palantir.atlasdb.schema.generated.SweepPriorityTable;
import com.palantir.atlasdb.schema.generated.SweepTableFactory;
import com.palantir.atlasdb.services.AtlasDbServices;
import com.palantir.atlasdb.sweep.SweepTaskRunner;
import com.palantir.atlasdb.transaction.impl.TxTask;
import com.palantir.common.base.Throwables;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
import com.google.common.collect.Iterables;
import com.google.common.collect.Sets;
import com.palantir.atlasdb.cli.command.SingleBackendCommand;
import com.palantir.atlasdb.cli.services.AtlasDbServices;
import com.palantir.atlasdb.services.AtlasDbServices;

import io.airlift.airline.Option;
import io.airlift.airline.OptionType;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@

import com.google.common.collect.HashMultimap;
import com.google.common.collect.Multimap;
import com.palantir.atlasdb.cli.services.AtlasDbServices;
import com.palantir.atlasdb.keyvalue.api.Cell;
import com.palantir.atlasdb.keyvalue.api.KeyValueService;
import com.palantir.atlasdb.keyvalue.api.RangeRequest;
import com.palantir.atlasdb.keyvalue.api.RowResult;
import com.palantir.atlasdb.keyvalue.api.Value;
import com.palantir.atlasdb.services.AtlasDbServices;
import com.palantir.atlasdb.transaction.impl.TransactionConstants;
import com.palantir.common.base.ClosableIterator;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.palantir.atlasdb.cli.services.AtlasDbServices;
import com.palantir.atlasdb.services.AtlasDbServices;
import com.palantir.timestamp.PersistentTimestampService;
import com.palantir.timestamp.TimestampService;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
import org.slf4j.LoggerFactory;

import com.palantir.atlasdb.cleaner.KeyValueServicePuncherStore;
import com.palantir.atlasdb.cli.services.AtlasDbServices;
import com.palantir.atlasdb.services.AtlasDbServices;

import io.airlift.airline.Command;
import io.airlift.airline.Option;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@
import com.palantir.atlasdb.AtlasDbConstants;
import com.palantir.atlasdb.cli.runner.AbstractTestRunner;
import com.palantir.atlasdb.cli.runner.InMemoryTestRunner;
import com.palantir.atlasdb.cli.services.AtlasDbServices;
import com.palantir.atlasdb.encoding.PtBytes;
import com.palantir.atlasdb.keyvalue.api.Cell;
import com.palantir.atlasdb.keyvalue.api.Namespace;
import com.palantir.atlasdb.keyvalue.api.TableReference;
import com.palantir.atlasdb.schema.SweepSchema;
import com.palantir.atlasdb.services.AtlasDbServices;
import com.palantir.atlasdb.table.description.Schemas;

public class TestKvsMigrationCommand {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@
import com.palantir.atlasdb.AtlasDbConstants;
import com.palantir.atlasdb.cli.runner.AbstractTestRunner;
import com.palantir.atlasdb.cli.runner.InMemoryTestRunner;
import com.palantir.atlasdb.cli.services.AtlasDbServices;
import com.palantir.atlasdb.keyvalue.api.TableReference;
import com.palantir.atlasdb.services.AtlasDbServices;

import io.airlift.airline.Cli;
import io.airlift.airline.Command;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,7 @@
import com.google.common.io.BaseEncoding;
import com.palantir.atlasdb.cli.runner.InMemoryTestRunner;
import com.palantir.atlasdb.cli.runner.SingleBackendCliTestRunner;
import com.palantir.atlasdb.cli.services.AtlasDbServicesFactory;
import com.palantir.atlasdb.cli.services.DaggerTestAtlasDbServices;
import com.palantir.atlasdb.cli.services.ServicesConfigModule;
import com.palantir.atlasdb.cli.services.TestAtlasDbServices;
import com.palantir.atlasdb.cli.services.TestSweeperModule;
import com.palantir.atlasdb.keyvalue.api.Cell;
Expand All @@ -39,6 +37,8 @@
import com.palantir.atlasdb.keyvalue.api.TableReference;
import com.palantir.atlasdb.keyvalue.api.Value;
import com.palantir.atlasdb.protos.generated.TableMetadataPersistence;
import com.palantir.atlasdb.services.AtlasDbServicesFactory;
import com.palantir.atlasdb.services.ServicesConfigModule;
import com.palantir.atlasdb.table.description.TableDefinition;
import com.palantir.atlasdb.table.description.ValueType;
import com.palantir.atlasdb.transaction.api.ConflictHandler;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,10 @@
import com.palantir.atlasdb.cli.command.timestamp.FetchTimestamp;
import com.palantir.atlasdb.cli.runner.InMemoryTestRunner;
import com.palantir.atlasdb.cli.runner.SingleBackendCliTestRunner;
import com.palantir.atlasdb.cli.services.AtlasDbServicesFactory;
import com.palantir.atlasdb.cli.services.DaggerTestAtlasDbServices;
import com.palantir.atlasdb.cli.services.ServicesConfigModule;
import com.palantir.atlasdb.cli.services.TestAtlasDbServices;
import com.palantir.atlasdb.services.AtlasDbServicesFactory;
import com.palantir.atlasdb.services.ServicesConfigModule;
import com.palantir.common.time.Clock;
import com.palantir.lock.LockClient;
import com.palantir.lock.LockDescriptor;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@

import com.palantir.atlasdb.cli.AtlasCli;
import com.palantir.atlasdb.cli.command.SingleBackendCommand;
import com.palantir.atlasdb.cli.services.AtlasDbServices;
import com.palantir.atlasdb.cli.services.AtlasDbServicesFactory;
import com.palantir.atlasdb.services.AtlasDbServices;
import com.palantir.atlasdb.services.AtlasDbServicesFactory;
import com.palantir.atlasdb.spi.KeyValueServiceConfig;

public abstract class AbstractTestRunner <S extends AtlasDbServices> implements SingleBackendCliTestRunner {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@

import java.net.URISyntaxException;

import com.palantir.atlasdb.cli.services.AtlasDbServices;
import com.palantir.atlasdb.cli.services.AtlasDbServicesFactory;
import com.palantir.atlasdb.services.AtlasDbServices;
import com.palantir.atlasdb.services.AtlasDbServicesFactory;

public interface SingleBackendCliTestRunner extends AutoCloseable {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,18 @@

import javax.inject.Singleton;

import com.palantir.atlasdb.services.AtlasDbServices;
import com.palantir.atlasdb.services.KeyValueServiceModule;
import com.palantir.atlasdb.services.LockAndTimestampModule;
import com.palantir.atlasdb.services.RawKeyValueServiceModule;
import com.palantir.atlasdb.services.ServicesConfigModule;
import com.palantir.lock.LockClient;

import dagger.Component;

@Singleton
@Component(modules = { ServicesConfigModule.class, KeyValueServiceModule.class, RawKeyValueServiceModule.class,
LockAndTimestampModule.class, TestSweeperModule.class, TestTransactionManagerModule.class })
@Component(modules = {ServicesConfigModule.class, KeyValueServiceModule.class, RawKeyValueServiceModule.class,
LockAndTimestampModule.class, TestSweeperModule.class, TestTransactionManagerModule.class })
public abstract class TestAtlasDbServices extends AtlasDbServices {

public abstract LockClient getTestLockClient();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
import com.palantir.atlasdb.config.AtlasDbConfig;
import com.palantir.atlasdb.factory.TransactionManagers;
import com.palantir.atlasdb.keyvalue.api.KeyValueService;
import com.palantir.atlasdb.services.ServicesConfig;
import com.palantir.atlasdb.transaction.api.AtlasDbConstraintCheckingMode;
import com.palantir.atlasdb.transaction.impl.ConflictDetectionManager;
import com.palantir.atlasdb.transaction.impl.SerializableTransactionManager;
Expand Down
11 changes: 11 additions & 0 deletions atlasdb-dagger/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
apply plugin: 'org.inferred.processors'

apply from: '../gradle/shared.gradle'

dependencies {
compile project(':atlasdb-service')
compile 'com.google.dagger:dagger:2.0.2'

processor 'com.google.dagger:dagger-compiler:2.0.2'
processor 'org.immutables:value:' + libVersions.immutables
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright 2015 Palantir Technologies
* Copyright 2016 Palantir Technologies
*
* Licensed under the BSD-3 License (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.palantir.atlasdb.cli.services;
package com.palantir.atlasdb.services;

import javax.inject.Named;
import javax.inject.Singleton;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright 2015 Palantir Technologies
* Copyright 2016 Palantir Technologies
*
* Licensed under the BSD-3 License (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.palantir.atlasdb.cli.services;
package com.palantir.atlasdb.services;

public interface AtlasDbServicesFactory {
<T extends AtlasDbServices> T connect(ServicesConfigModule servicesConfigModule);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright 2015 Palantir Technologies
* Copyright 2016 Palantir Technologies
*
* Licensed under the BSD-3 License (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.palantir.atlasdb.cli.services;
package com.palantir.atlasdb.services;

import javax.inject.Named;
import javax.inject.Singleton;
Expand Down Expand Up @@ -43,12 +43,17 @@ public class KeyValueServiceModule {
@Provides
@Singleton
@Named("kvs")
public KeyValueService provideWrappedKeyValueService(@Named("rawKvs") KeyValueService rawKvs, TimestampService tss, ServicesConfig config) {
public KeyValueService provideWrappedKeyValueService(@Named("rawKvs") KeyValueService rawKvs,
TimestampService tss,
ServicesConfig config) {
KeyValueService kvs = NamespacedKeyValueServices.wrapWithStaticNamespaceMappingKvs(rawKvs);
kvs = new SweepStatsKeyValueService(kvs, tss);
TransactionTables.createTables(kvs);

for (Schema schema : ImmutableSet.<Schema>builder().add(SweepSchema.INSTANCE.getLatestSchema()).addAll(config.schemas()).build()) {
ImmutableSet<Schema> schemas =
ImmutableSet.<Schema>builder()
.add(SweepSchema.INSTANCE.getLatestSchema())
.addAll(config.schemas()).build();
for (Schema schema : schemas) {
Schemas.createTablesAndIndexes(schema, kvs);
}
return kvs;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright 2015 Palantir Technologies
* Copyright 2016 Palantir Technologies
*
* Licensed under the BSD-3 License (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -13,13 +13,12 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.palantir.atlasdb.cli.services;
package com.palantir.atlasdb.services;

import static com.palantir.atlasdb.factory.TransactionManagers.LockAndTimestampServices;
import static com.palantir.atlasdb.factory.TransactionManagers.createLockAndTimestampServices;

import javax.inject.Singleton;

import com.palantir.atlasdb.factory.TransactionManagers;
import com.palantir.lock.RemoteLockService;
import com.palantir.lock.impl.LockServiceImpl;
import com.palantir.timestamp.TimestampService;
Expand All @@ -32,24 +31,24 @@ public class LockAndTimestampModule {

@Provides
@Singleton
public LockAndTimestampServices provideLockAndTimestampServices(ServicesConfig config) {
return createLockAndTimestampServices(
public TransactionManagers.LockAndTimestampServices provideLockAndTimestampServices(ServicesConfig config) {
return TransactionManagers.createLockAndTimestampServices(
config.atlasDbConfig(),
config.sslSocketFactory(),
resource -> {},
resource -> { },
LockServiceImpl::create,
() -> config.atlasDbSupplier().getTimestampService());
}

@Provides
@Singleton
public TimestampService provideTimestampService(LockAndTimestampServices lts) {
public TimestampService provideTimestampService(TransactionManagers.LockAndTimestampServices lts) {
return lts.time();
}

@Provides
@Singleton
public RemoteLockService provideLockService(LockAndTimestampServices lts) {
public RemoteLockService provideLockService(TransactionManagers.LockAndTimestampServices lts) {
return lts.lock();
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright 2015 Palantir Technologies
* Copyright 2016 Palantir Technologies
*
* Licensed under the BSD-3 License (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.palantir.atlasdb.cli.services;
package com.palantir.atlasdb.services;

import javax.inject.Named;
import javax.inject.Singleton;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright 2015 Palantir Technologies
* Copyright 2016 Palantir Technologies
*
* Licensed under the BSD-3 License (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.palantir.atlasdb.cli.services;
package com.palantir.atlasdb.services;

import java.util.Set;

Expand Down
Loading

0 comments on commit 6d3208d

Please sign in to comment.