-
Notifications
You must be signed in to change notification settings - Fork 0
Local Instance Setup
- Maven (http://maven.apache.org/) set up and on your path
- You need git
- You need an instance of Zookeeper that you have access to
Pinot 2.0 is built using Maven.
- Check out the project from Github
git clone https://github.com/linkedin/pinot.git- Compile the project using Maven
mvn -DskipTests install- Optionally run the unit tests (approximately 20 minutes)
mvn testIf you have M2Eclipse set up, you can import the project according to the M2Eclipse instructions. Otherwise, you can create the Eclipse project manually using mvn eclipse:eclipse, then configure the M2_REPO classpath variable (see http://www.mkyong.com/maven/how-to-configure-m2_repo-variable-in-eclipse-ide/ for example), after which it will compile. Some of the integration tests are broken due to Eclipse classpath ordering, but they run correctly when maven is launched manually through the command line.
Open the project directory, IDEA will load it as a normal Maven project. No further configuration is necessary.
For debugging purposes, the easiest way to run everything is to run a cluster is to run an entire cluster in a single JVM. One way to do it is to create a class in the integration tests that launches a Zookeeper instance, creates a controller, a broker and a server and launches all three within the same JVM. This way, breakpoints will work as expected
package com.linkedin.pinot.integration.tests;
import com.linkedin.pinot.broker.broker.BrokerTestUtils;
import com.linkedin.pinot.common.ZkTestUtils;
import com.linkedin.pinot.common.utils.CommonConstants;
import com.linkedin.pinot.controller.helix.ControllerTestUtils;
import com.linkedin.pinot.server.util.ServerTestUtils;
import org.apache.commons.configuration.Configuration;
public class PinotCluster extends ClusterTest {
public PinotCluster() throws Exception {
ZkTestUtils.startLocalZkServer();
ControllerTestUtils.startController(HELIX_CLUSTER_NAME, ZkTestUtils.DEFAULT_ZK_STR, ControllerTestUtils.getDefaultControllerConfiguration());
Configuration defaultServerConfiguration = ServerTestUtils.getDefaultServerConfiguration();
defaultServerConfiguration.setProperty(CommonConstants.Server.CONFIG_OF_INSTANCE_READ_MODE, "mmap");
ServerTestUtils.startServer(HELIX_CLUSTER_NAME, ZkTestUtils.DEFAULT_ZK_STR, defaultServerConfiguration);
BrokerTestUtils.startBroker(HELIX_CLUSTER_NAME, ZkTestUtils.DEFAULT_ZK_STR, BrokerTestUtils.getDefaultBrokerConfiguration());
// Create a data resource
createOfflineResource("MyResource", "DaysSinceEpoch", "daysSinceEpoch", 300, "DAYS");
// Add table to resource
addTableToOfflineResource("MyResource", "MyTable", "DaysSinceEpoch", "daysSinceEpoch");
}
public static final String HELIX_CLUSTER_NAME = "ide-test";
public static void main(String[] args) throws Exception {
new PinotCluster();
}
@Override
protected String getHelixClusterName() {
return HELIX_CLUSTER_NAME;
}
}- Multitenancy
- Architecture
- Query Execution
- [Pinot Core Concepts and Terminology] (Pinot-Core-Concepts-and-Terminology)
- [Low level kafka Consumers] (Low-level-kafka-consumers)
- [Expressions & UDF Support] (Expressions-&-UDF-support)