Skip to content

Commit

Permalink
Merge pull request #1 from metamx/master
Browse files Browse the repository at this point in the history
Update to latest master
  • Loading branch information
cheddar committed Oct 9, 2013
2 parents aa9aa49 + 3364b9a commit adf6625
Show file tree
Hide file tree
Showing 375 changed files with 3,439 additions and 4,641 deletions.
2 changes: 1 addition & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@ echo "For examples, see: "
echo " "
ls -1 examples/*/*sh
echo " "
echo "See also https://github.com/metamx/druid/wiki"
echo "See also http://druid.io/docs/0.6.0/Home.html"
9 changes: 6 additions & 3 deletions cassandra-storage/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,18 @@

<dependencies>
<dependency>
<groupId>com.metamx.druid</groupId>
<artifactId>druid-server</artifactId>
<version>${project.parent.version}</version>
<groupId>io.druid</groupId>
<artifactId>druid-api</artifactId>
</dependency>
<dependency>
<groupId>com.netflix.astyanax</groupId>
<artifactId>astyanax</artifactId>
<version>1.0.1</version>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
</dependency>

<!-- Tests -->
<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/

package io.druid.segment.loading.cassandra;
package io.druid.storage.cassandra;

import com.fasterxml.jackson.annotation.JsonProperty;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/

package io.druid.segment.loading.cassandra;
package io.druid.storage.cassandra;

import com.google.common.io.Files;
import com.google.inject.Inject;
Expand All @@ -28,10 +28,10 @@
import com.netflix.astyanax.model.ColumnList;
import com.netflix.astyanax.recipes.storage.ChunkedStorage;
import com.netflix.astyanax.recipes.storage.ObjectMetadata;
import io.druid.common.utils.CompressionUtils;
import io.druid.segment.loading.DataSegmentPuller;
import io.druid.segment.loading.SegmentLoadingException;
import io.druid.timeline.DataSegment;
import io.druid.utils.CompressionUtils;
import org.apache.commons.io.FileUtils;

import java.io.File;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/

package io.druid.segment.loading.cassandra;
package io.druid.storage.cassandra;

import com.fasterxml.jackson.databind.ObjectMapper;
import com.google.common.base.Joiner;
Expand All @@ -26,11 +26,11 @@
import com.metamx.common.logger.Logger;
import com.netflix.astyanax.MutationBatch;
import com.netflix.astyanax.recipes.storage.ChunkedStorage;
import io.druid.common.utils.CompressionUtils;
import io.druid.segment.IndexIO;
import io.druid.segment.SegmentUtils;
import io.druid.segment.loading.DataSegmentPusher;
import io.druid.segment.loading.DataSegmentPusherUtil;
import io.druid.timeline.DataSegment;
import io.druid.utils.CompressionUtils;

import java.io.File;
import java.io.FileInputStream;
Expand All @@ -57,7 +57,13 @@ public CassandraDataSegmentPusher(
this.jsonMapper=jsonMapper;
}

@Override
@Override
public String getPathForHadoop(String dataSource)
{
throw new UnsupportedOperationException("Cassandra storage does not support indexing via Hadoop");
}

@Override
public DataSegment push(final File indexFilesDir, DataSegment segment) throws IOException
{
log.info("Writing [%s] to C*", indexFilesDir);
Expand All @@ -71,7 +77,7 @@ public DataSegment push(final File indexFilesDir, DataSegment segment) throws IO
long indexSize = CompressionUtils.zip(indexFilesDir, compressedIndexFile);
log.info("Wrote compressed file [%s] to [%s]", compressedIndexFile.getAbsolutePath(), key);

int version = IndexIO.getVersionFromDir(indexFilesDir);
int version = SegmentUtils.getVersionFromDir(indexFilesDir);

try
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/

package io.druid.segment.loading.cassandra;
package io.druid.storage.cassandra;

import com.fasterxml.jackson.databind.Module;
import com.google.common.collect.ImmutableList;
import com.google.inject.Binder;
import com.google.inject.Key;
import io.druid.guice.DruidBinders;
import io.druid.guice.Binders;
import io.druid.guice.JsonConfigProvider;
import io.druid.guice.LazySingleton;
import io.druid.guice.PolyBind;
Expand All @@ -45,7 +45,7 @@ public List<? extends Module> getJacksonModules()
@Override
public void configure(Binder binder)
{
DruidBinders.dataSegmentPullerBinder(binder)
Binders.dataSegmentPullerBinder(binder)
.addBinding("c*")
.to(CassandraDataSegmentPuller.class)
.in(LazySingleton.class);
Expand All @@ -54,6 +54,6 @@ public void configure(Binder binder)
.addBinding("c*")
.to(CassandraDataSegmentPusher.class)
.in(LazySingleton.class);
JsonConfigProvider.bind(binder, "druid.pusher", CassandraDataSegmentConfig.class);
JsonConfigProvider.bind(binder, "druid.storage", CassandraDataSegmentConfig.class);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/

package io.druid.segment.loading.cassandra;
package io.druid.storage.cassandra;

import com.netflix.astyanax.AstyanaxContext;
import com.netflix.astyanax.Keyspace;
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
io.druid.segment.loading.cassandra.CassandraDruidModule
io.druid.storage.cassandra.CassandraDruidModule
43 changes: 0 additions & 43 deletions common/src/main/java/io/druid/common/guava/Runnables.java

This file was deleted.

142 changes: 0 additions & 142 deletions common/src/main/java/io/druid/common/utils/CompressionUtils.java

This file was deleted.

2 changes: 1 addition & 1 deletion common/src/main/java/io/druid/db/DbConnector.java
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ public void createRulesTable()
public void createConfigTable()
{
if (config.get().isCreateTables()) {
createRuleTable(dbi, dbTables.get().getConfigTable());
createConfigTable(dbi, dbTables.get().getConfigTable());
}
}

Expand Down
7 changes: 4 additions & 3 deletions common/src/main/java/io/druid/db/DbTablesConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,9 @@ public static DbTablesConfig fromBase(String base)
return new DbTablesConfig(base, null, null, null, null, null, null);
}

@JsonProperty
@NotNull
private static String defaultBase = "druid";

@JsonProperty("base")
private final String base;

@JsonProperty("segments")
Expand Down Expand Up @@ -66,7 +67,7 @@ public DbTablesConfig(
@JsonProperty("taskLock") String taskLockTable
)
{
this.base = base;
this.base = (base == null) ? defaultBase : base;
this.segmentsTable = makeTableName(segmentsTable, "segments");
this.rulesTable = makeTableName(rulesTable, "rules");
this.configTable = makeTableName(configTable, "config");
Expand Down
Loading

0 comments on commit adf6625

Please sign in to comment.