diff --git a/cassandra-storage/pom.xml b/cassandra-storage/pom.xml index 76af3436ca2..18bb069e6db 100644 --- a/cassandra-storage/pom.xml +++ b/cassandra-storage/pom.xml @@ -20,15 +20,15 @@ 4.0.0 - com.metamx.druid + io.druid.extensions druid-cassandra-storage druid-cassandra-storage druid-cassandra-storage - com.metamx + io.druid druid - 0.6.0-SNAPSHOT + 0.6.1-SNAPSHOT diff --git a/common/pom.xml b/common/pom.xml index af29a79f989..b4db9d5c930 100644 --- a/common/pom.xml +++ b/common/pom.xml @@ -20,15 +20,15 @@ 4.0.0 - com.metamx.druid + io.druid druid-common druid-common druid-common - com.metamx + io.druid druid - 0.6.0-SNAPSHOT + 0.6.1-SNAPSHOT diff --git a/common/src/main/java/io/druid/common/config/ConfigManager.java b/common/src/main/java/io/druid/common/config/ConfigManager.java index 0ec4cd33181..172c82a6e1c 100644 --- a/common/src/main/java/io/druid/common/config/ConfigManager.java +++ b/common/src/main/java/io/druid/common/config/ConfigManager.java @@ -23,6 +23,7 @@ import com.google.common.base.Supplier; import com.google.common.base.Throwables; import com.google.common.collect.Maps; import com.google.inject.Inject; +import com.metamx.common.ISE; import com.metamx.common.concurrent.ScheduledExecutors; import com.metamx.common.lifecycle.LifecycleStart; import com.metamx.common.lifecycle.LifecycleStop; @@ -38,6 +39,7 @@ import org.skife.jdbi.v2.tweak.ResultSetMapper; import java.sql.ResultSet; import java.sql.SQLException; import java.util.Arrays; +import java.util.List; import java.util.Map; import java.util.concurrent.Callable; import java.util.concurrent.ConcurrentMap; @@ -76,7 +78,7 @@ public class ConfigManager final String configTable = dbTables.get().getConfigTable(); this.selectStatement = String.format("SELECT payload FROM %s WHERE name = :name", configTable); - insertStatement = String.format( + this.insertStatement = String.format( "INSERT INTO %s (name, payload) VALUES (:name, :payload) ON DUPLICATE KEY UPDATE payload = :payload", configTable ); @@ -186,19 +188,29 @@ public class ConfigManager @Override public byte[] withHandle(Handle handle) throws Exception { - return handle.createQuery(selectStatement) - .bind("name", key) - .map( - new ResultSetMapper() - { - @Override - public byte[] map(int index, ResultSet r, StatementContext ctx) throws SQLException - { - return r.getBytes("payload"); - } - } - ) - .first(); + List matched = handle.createQuery(selectStatement) + .bind("name", key) + .map( + new ResultSetMapper() + { + @Override + public byte[] map(int index, ResultSet r, StatementContext ctx) + throws SQLException + { + return r.getBytes("payload"); + } + } + ).list(); + + if (matched.isEmpty()) { + return null; + } + + if (matched.size() > 1) { + throw new ISE("Error! More than one matching entry[%d] found for [%s]?!", matched.size(), key); + } + + return matched.get(0); } } ); diff --git a/docs/_graphics/druid-dataflow.svg b/docs/_graphics/druid-dataflow.svg new file mode 100644 index 00000000000..a26eae87aaa --- /dev/null +++ b/docs/_graphics/druid-dataflow.svg @@ -0,0 +1,725 @@ + + + + + 2013-07-10 16:52Z + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + streaming + data + + + client + + + + batch + data + + + + + + + + + + + + + + + + realtime + nodes + + + + + historical + nodes + + + + + MySQL + + + + + coordinator + nodes + + + + + deep + storage + + + + + Zoo + Keeper + + + + + + broker + nodes + + + + + external dependencies + + + + + druid components + + + diff --git a/docs/_graphics/indexing_service.dot b/docs/_graphics/indexing_service.dot new file mode 100644 index 00000000000..38505512998 --- /dev/null +++ b/docs/_graphics/indexing_service.dot @@ -0,0 +1,41 @@ +// dot -Gnewrank -Tpng indexing_service.dot > indexing_service.png + +digraph g { + node [ fontname = "Helvetica Neue" ] + node [ fontname = "Helvetica Neue" ] + edge [ fontname = "Helvetica Neue Light Italic" fontsize = 12] + + new_task[shape="plaintext" fontname="Helvetica Neue Light Italic"] + overlord[shape="box" label="Overlord"] + + new_task -> overlord + overlord -> zk_tasks:mm1:n [label = "new_task"] + zk_tasks:mm1 -> mm1 [label = "new_task"] + + subgraph cluster_0 { + style = "dotted" + label = "ZooKeeper" + fontname = "Helvetica Neue" + + zk_status -> zk_tasks [style="invis"] + + zk_status [fontname="Source Code Pro" shape = record label = " /status | { /new_task }"] + zk_tasks [fontname="Source Code Pro" shape=record label=" /tasks | { /mm1 | /mm2 | /mm3}"] + + { rank = same; zk_status zk_tasks } + } + + subgraph cluster_mm1 { + style="dotted" + mm1 [shape = "box" label = "Middle Manager 1" ] + peon_11[label = "peon"] + peon_12[label = "peon"] + peon_13[label = "peon"] + + mm1 -> peon_11 [label = "new_task"] + mm1 -> { peon_12; peon_13 } + } + + zk_status:new_task:s -> peon_11:e [label = "new_task_status" dir = back] + overlord:e -> zk_status:new_task:n [dir=back label="new_task_status"] +} diff --git a/docs/_includes/page_footer.html b/docs/_includes/page_footer.html index e8fe3e85aa6..1890df00f8b 100644 --- a/docs/_includes/page_footer.html +++ b/docs/_includes/page_footer.html @@ -11,9 +11,6 @@ info@druid.io
- Metamarkets - 625 2nd Street, Suite #230
- San Francisco, CA 94017
@@ -25,7 +22,7 @@
  • DRUID
  • What is Druid?
  • Downloads
  • -
  • Documentation
  • +
  • Documentation