Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
73 commits
Select commit Hold shift + click to select a range
884c5b0
DRILL-4236: ExternalSort should use the new allocator functionality t…
adeneche Dec 30, 2015
dd20723
Nested/Grouped conditions
acmeguy Jan 6, 2016
d74893c
Additional refactoring
acmeguy Jan 6, 2016
a96a2b9
Fix a regression
acmeguy Jan 6, 2016
b9bc35a
DRILL-4250: Fix directory-based partition pruning when directory has …
jinfengni Jan 7, 2016
039702e
Minor refactoring and prep for Array fields
acmeguy Jan 8, 2016
4647760
Still wrestling exact matches
acmeguy Jan 8, 2016
bd4d42d
Still wrestling exact matches
acmeguy Jan 8, 2016
46a517b
Still wrestling exact and like matches
acmeguy Jan 8, 2016
5cb8eb9
DRILL-4174: fix for DRILL-4081 mistakenly regresses the fix for DRILL…
adeneche Jan 8, 2016
98a0639
Temporary workaround
acmeguy Jan 9, 2016
467c405
Fix issue where FutureBitComment didn't return buffer as part of future.
jacques-n Jan 3, 2016
67d5cc6
DRILL-4238: Add a custom RPC interface on the Control channel for ext…
jacques-n Jan 2, 2016
f964908
DRILL-4257: Fix StoragePluginRegistry clean-up behavior and misc clea…
jacques-n Jan 10, 2016
5dfb451
DRILL-4241: initial commit
jacques-n Nov 19, 2015
805e041
DRILL-4241: Fixing the build, make RAT and checkstyle happy.
jaltekruse Jan 11, 2016
8aac12b
DRILL-4241: Various Type Fixes
toddlipcon Jan 11, 2016
2c0e53a
DRILL-4241: Add pushdown of column projections
toddlipcon Nov 19, 2015
697579b
DRILL-4241: Add table metadata and DROP table support
jacques-n Nov 19, 2015
b1d9d79
DRILL-4241: Improve record reader and type mappings
toddlipcon Nov 19, 2015
4f3f401
DRILL-4241: Add parallelization and assignment
StevenMPhillips Nov 20, 2015
6a406aa
DRILL-4241: Create table with multiple tablets in kudu test.
amithadke Nov 20, 2015
4ba5155
DRILL-4241: Rewrite RecordReader to support NULLs and be less Java-like
toddlipcon Nov 20, 2015
54cf727
DRILL-4241: Add wait stats and estimated row count in RecordReader
StevenMPhillips Nov 20, 2015
3694909
DRILL-4241: Timestamps should divide by 1000 in reader
toddlipcon Nov 20, 2015
392d1f7
DRILL-4241: Add Single Tablet Writer
jacques-n Nov 20, 2015
9dad9da
DRILL-3201: Support security for access through Web UI
vkorukanti Sep 13, 2015
64b41a6
Merge branch 'master' of https://github.com/apache/drill into lucene-…
acmeguy Jan 14, 2016
066c537
Join progress
acmeguy Jan 14, 2016
53b0df7
Join progress
acmeguy Jan 14, 2016
2c47afa
Join progress
acmeguy Jan 14, 2016
10586db
Join progress
acmeguy Jan 14, 2016
b66a845
Join progress
acmeguy Jan 14, 2016
1744e0c
Join progress
acmeguy Jan 14, 2016
28bf553
Minor Reporting for Schema Changes
acmeguy Jan 15, 2016
6dc8e72
join progress
acmeguy Jan 15, 2016
8a28131
DRILL-3845: UnorderedReceiver shouldn't terminate until it receives a…
adeneche Jan 6, 2016
a7b43b8
Merge branch 'master' of https://github.com/apache/drill into lucene-…
acmeguy Jan 15, 2016
412d08f
DRILL-4131: Move RPC allocators under Drill's root allocator & accoun…
jacques-n Jan 15, 2016
43414e1
DRILL-4278: Heap memory leak issues
jacques-n Jan 19, 2016
664d34e
DRILL-4277: Fix for JdbcPrel serialization issue.
jacques-n Jan 15, 2016
a0ae83c
DRILL-4246: Fix Allocator concurrency bug and improve error detection
jacques-n Jan 11, 2016
06e93e6
DRILL-4285: Bumps FMPP version to 0.9.15/FreeMarker to 2.3.21
laurentgo Jan 19, 2016
9cc7e11
DRILL-4288: Removes obsolete protobuf-generated files
laurentgo Jan 20, 2016
88ea7a2
DRILL-4256: Create HiveConf per HiveStoragePlugin and reuse it wherev…
vkorukanti Jan 11, 2016
34bf45f
DRILL-4182 Take care of null comparisions.
amithadke Dec 17, 2015
717adcb
DRILL-4182 Set type to LATE when values are nulls.
amithadke Dec 17, 2015
2f0e3f2
DRILL-4190 Don't hold on to batches from left side of merge join.
amithadke Jan 4, 2016
836d250
smu
acmeguy Jan 21, 2016
3d0b4b0
DRILL-4270: Create a separate WindowFramer that supports the FRAME cl…
adeneche Jan 11, 2016
bbd2e5c
update
acmeguy Jan 21, 2016
d70cf36
DRILL-4196 Fix to stop returning no more data when output batch is fu…
amithadke Jan 27, 2016
a515719
DRILL-4291: Fix Missing classes when trying to query varchar[] using …
jacques-n Jan 24, 2016
9fa7b28
DRILL-2653: Improve web UI experience when there is an error in a sto…
jaltekruse Jan 28, 2016
1b51850
DRILL-4322: Add underlying exception message when IOException causes …
jaltekruse Jan 28, 2016
576271d
DRILL-4313: CPP client - Improve method to pick random drillbit from …
parthchandra Jan 26, 2016
eb1a010
update from upstream 1.5
acmeguy Jan 29, 2016
98e62d8
Merge branch 'lucene-work' of github.com:activitystream/drill into lu…
acmeguy Jan 29, 2016
03197d0
DRILL-4328: Fix backward compatibility regression caused by DRILL-4198
vkorukanti Jan 28, 2016
09de31e
DRILL-2517: (Prototype from Adam) Apply directory-based pruning befor…
AdamPD Jan 18, 2016
c7dfba2
DRILL-2517: (Prototype from Mehant) Move directory based partition pr…
mehant Nov 11, 2015
9b4008d
DRILL-2517: Move directory-based partition pruning to Calcite logical…
jinfengni Jan 8, 2016
9ff9472
DRILL-4279: Improve performance for skipAll query against Text/JSON/P…
jinfengni Jan 20, 2016
5c8b0d0
Merge branch 'master' of https://github.com/apache/drill into lucene-…
acmeguy Feb 1, 2016
724ebd2
Merge branch 'lucene-work' of https://github.com/activitystream/drill…
acmeguy Feb 1, 2016
1b96174
DRILL-4128: Fix NPE when calling getString on a JDBC ResultSet when t…
jaltekruse Feb 1, 2016
a811fa1
Merge branch 'master' of https://github.com/apache/drill into lucene-…
acmeguy Feb 2, 2016
cf2d1f8
Merge branch 'lucene-work' of github.com:activitystream/drill into lu…
acmeguy Feb 2, 2016
6a36a70
DRILL-4339: Reverse the function signature change made to AbstractRe…
jinfengni Feb 2, 2016
7f7c32a
Merge branch 'master' of https://github.com/apache/drill into lucene-…
acmeguy Feb 3, 2016
cb1a023
DRILL-4235: record new state STARTING when state transitions to START…
hnfgns Feb 4, 2016
ca53c24
DRILL-4349: parquet reader returns wrong results when reading a nulla…
adeneche Feb 3, 2016
cf34dea
Merge branch 'master' of https://github.com/apache/drill into lucene-…
acmeguy Feb 5, 2016
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

import java.lang.management.ManagementFactory;
import java.lang.management.RuntimeMXBean;
import java.lang.reflect.Constructor;
import java.net.URL;
import java.util.Collection;
import java.util.List;
Expand All @@ -27,17 +28,19 @@
import java.util.concurrent.TimeUnit;

import org.apache.drill.common.exceptions.DrillConfigurationException;
import org.apache.drill.common.exceptions.UserException;
import org.apache.drill.common.scanner.ClassPathScanner;
import org.reflections.util.ClasspathHelper;

import com.google.common.annotations.VisibleForTesting;
import com.google.common.base.Preconditions;
import com.google.common.base.Stopwatch;
import com.google.common.collect.ImmutableList;
import com.typesafe.config.Config;
import com.typesafe.config.ConfigFactory;
import com.typesafe.config.ConfigRenderOptions;

public final class DrillConfig extends NestedConfig{
public class DrillConfig extends NestedConfig {
private static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(DrillConfig.class);

private final ImmutableList<String> startupArguments;
Expand All @@ -58,6 +61,36 @@ public DrillConfig(Config config, boolean enableServerConfigs) {
logger.debug("DrillConfig object initialized.");
}

/**
* Get an instance of the provided interface using the configuration path provided. Construct the object based on the
* provided constructor arguments.
* @param path
* The configuration path to use.
* @param iface
* The Interface or Superclass of the instance you requested.
* @param constructorArgs
* Any arguments required for constructing the requested type.
* @return The new Object instance that implements the provided Interface
*/
@SuppressWarnings("unchecked")
public <T> T getInstance(String path, Class<T> iface, Object... constructorArgs) {
try{
String className = this.getString(path);
Class<?> clazz = Class.forName(className);
Preconditions.checkArgument(iface.isAssignableFrom(clazz));
Class<?>[] argClasses = new Class[constructorArgs.length];
for (int i = 0; i < constructorArgs.length; i++) {
argClasses[i] = constructorArgs[i].getClass();
}
Constructor<?> constructor = clazz.getConstructor(argClasses);
return (T) constructor.newInstance(constructorArgs);
}catch(Exception e){
throw UserException.unsupportedError(e)
.message("Failure while attempting to load instance of the class of type %s requested at path %s.",
iface.getName(), path).build(logger);
}
}

public List<String> getStartupArguments() {
return startupArguments;
}
Expand All @@ -81,6 +114,7 @@ public static DrillConfig forClient() {
return create(null, false);
}


/**
* <p>
* DrillConfig loads up Drill configuration information. It does this utilizing a combination of classpath scanning
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,16 @@ public class UserException extends DrillRuntimeException {
*/
public static Builder memoryError(final Throwable cause) {
return UserException.resourceError(cause)
.message(MEMORY_ERROR_MSG);
.message(MEMORY_ERROR_MSG).addContext(cause.getMessage());
}

public static Builder memoryError(final String format, final Object... args) {
Builder builder = UserException.resourceError();
builder.message(MEMORY_ERROR_MSG);
if (!format.isEmpty()) {
builder.addContext(String.format(format, args));
}
return builder;
}

/**
Expand All @@ -59,7 +68,7 @@ public static Builder memoryError(final Throwable cause) {
* @return resource error builder
*/
public static Builder memoryError() {
return memoryError(null);
return memoryError("");
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,14 @@ private static Slf4jReporter getLogReporter() {
}
}

public synchronized static <T extends Metric> void register(String name, T metric) {
boolean removed = RegistryHolder.REGISTRY.remove(name);
if (removed) {
logger.warn("Removing old metric since name matched newly registered metric. Metric name: {}", name);
}
RegistryHolder.REGISTRY.register(name, metric);
}

private static void registerAll(String prefix, MetricSet metricSet, MetricRegistry registry) {
for (Entry<String, Metric> entry : metricSet.getMetrics().entrySet()) {
if (entry.getValue() instanceof MetricSet) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,11 @@
import org.apache.calcite.plan.RelOptRuleCall;
import org.apache.calcite.plan.RelOptRuleOperand;
import org.apache.calcite.plan.RelOptUtil;
import org.apache.calcite.rel.InvalidRelException;
import org.apache.calcite.rex.RexNode;
import org.apache.drill.common.exceptions.DrillRuntimeException;
import org.apache.drill.exec.physical.base.GroupScan;
import org.apache.drill.exec.planner.common.DrillJoinRelBase;
import org.apache.drill.exec.store.StoragePluginOptimizerRule;
import org.apache.drill.exec.store.lucene.LuceneGroupScan;
import org.apache.drill.exec.store.lucene.LuceneScanSpec;
Expand All @@ -39,6 +41,7 @@ public abstract class LucenePushFilterIntoScan extends StoragePluginOptimizerRul
@Override
public boolean matches(RelOptRuleCall call) {
final DrillScanRel scan = (DrillScanRel) call.rel(1);

GroupScan groupScan = scan.getGroupScan();
if (groupScan instanceof LuceneGroupScan) {
if (((LuceneGroupScan) groupScan).supportsFilterPushDown()) {
Expand All @@ -60,6 +63,7 @@ public void onMatch(RelOptRuleCall call) {
"LucenePushPartitionFilterIntoScan:Filter_On_Project") {
@Override
public boolean matches(RelOptRuleCall call) {

final DrillScanRel scan = (DrillScanRel) call.rel(2);
GroupScan groupScan = scan.getGroupScan();
if (groupScan instanceof LuceneGroupScan) {
Expand All @@ -79,13 +83,90 @@ public void onMatch(RelOptRuleCall call) {
}
};

public static final StoragePluginOptimizerRule LUCENE_FILTER_ON_JOIN_REL = new LucenePushFilterIntoScan(RelOptHelper.some(DrillJoinRel.class, RelOptHelper.any(DrillScanRel.class)), "LucenePushPartitionFilterIntoScan:Filter_On_Join_Filter") {

@Override
public void doOnJoinMatch(RelOptRuleCall call, DrillJoinRel joinRel, DrillScanRel scanRel) {
super.doOnJoinMatch(call, joinRel, scanRel);
}

@Override
public boolean matches(RelOptRuleCall call) {

final DrillScanRel scan = (DrillScanRel) call.rel(1);
GroupScan groupScan = scan.getGroupScan();

if (groupScan instanceof LuceneGroupScan) {
if (((LuceneGroupScan) groupScan).supportsFilterPushDown()) {
return true;
}
}
return false;
}

@Override
public void onMatch(RelOptRuleCall call) {
final DrillJoinRel joinRel = (DrillJoinRel) call.rel(0);
final DrillScanRel scanRel = (DrillScanRel) call.rel(1);
doOnJoinMatch(call, joinRel, scanRel);
}

};

public void doOnJoinMatch(RelOptRuleCall call, DrillJoinRel joinRel, DrillScanRel scanRel) {

SqlJoinFilterToLuceneQuery sqlFilterToLuceneQuery = new SqlJoinFilterToLuceneQuery(((LuceneGroupScan) scanRel.getGroupScan()).getIndexFields(), joinRel);

joinRel.getCondition().accept(sqlFilterToLuceneQuery);

LuceneGroupScan luceneGroupScan = (LuceneGroupScan) scanRel.getGroupScan();
LuceneScanSpec luceneScanSpec = luceneGroupScan.getLuceneScanSpec();
LuceneScanSpec newLuceneScanSpec = new LuceneScanSpec(luceneScanSpec.getSelectionRoot(), luceneScanSpec.getSelection(), sqlFilterToLuceneQuery.getLuceneQuery());
try {

LuceneGroupScan newLuceneGroupScan = new LuceneGroupScan(
luceneGroupScan.getUserName(),
newLuceneScanSpec,
luceneGroupScan.getFormatPlugin(),
luceneGroupScan.getColumns()
);

DrillScanRel newScanRel = new DrillScanRel(
scanRel.getCluster(),
scanRel.getTraitSet().plus(DrillRel.DRILL_LOGICAL),
scanRel.getTable(),
newLuceneGroupScan,
scanRel.getRowType(),
scanRel.getColumns(),
true
);

/*
DrillJoinRel newScanRel = new DrillJoinRel(
scanRel.getCluster(),
scanRel.getTraitSet().plus(DrillRel.DRILL_LOGICAL),
joinRel
scanRel.getTable(),
newLuceneGroupScan,
scanRel.getRowType(),
scanRel.getColumns()
);
*/

//todo - figure out why this is breaking (see the re-writing above)
call.transformTo(newScanRel);
} catch (IOException e) {
throw new DrillRuntimeException(e);
}

}

private LucenePushFilterIntoScan(RelOptRuleOperand operand, String id) {
super(operand, id);
}


public void doOnMatch(RelOptRuleCall call, DrillFilterRel filterRel, DrillProjectRel projectRel, DrillScanRel scanRel) {

DrillRel inputRel = projectRel != null ? projectRel : scanRel;
SqlFilterToLuceneQuery sqlFilterToLuceneQuery = new SqlFilterToLuceneQuery(((LuceneGroupScan) scanRel.getGroupScan()).getIndexFields(), inputRel);

Expand Down
Loading