http://git-wip-us.apache.org/repos/asf/helix/blob/39e0d3fb/website/0.6.7/src/site/markdown/tutorial_task_framework.md
----------------------------------------------------------------------
diff --git a/website/0.6.7/src/site/markdown/tutorial_task_framework.md 
b/website/0.6.7/src/site/markdown/tutorial_task_framework.md
new file mode 100644
index 0000000..2415a95
--- /dev/null
+++ b/website/0.6.7/src/site/markdown/tutorial_task_framework.md
@@ -0,0 +1,359 @@
+<!---
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<head>
+  <title>Tutorial - Task Framework</title>
+</head>
+
+## [Helix Tutorial](./Tutorial.html): Task Framework
+
+Task framework, in Helix, provides executable task scheduling and workflow 
management. In Helix, three layers of task abstraction have been offered to 
user for defining their logics of dependencies. The graph shows the 
relationships between three layers. Workflow can contain multiple jobs. One job 
can depend on other one. Multiple tasks, including same task different 
partition and different task different partition, can be added in one job.
+Task framework not only can abstract three layers task logics but also helps 
doing task assignment and rebalancing. User can create a workflow (or a job 
queue) at first beginning. Then jobs can be added into workflow. Those jobs 
contain the executable tasks implemented by user. Once workflow is completed, 
Helix will schedule the works based on the condition user provided.
+
+![Task Framework flow chart](./images/TaskFrameworkLayers.png)
+
+### Key Concepts
+* Task is the basic unit in Helix task framework. It can represents the a 
single runnable logics that user prefer to execute for each partition 
(distributed units).
+* Job defines one time operation across all the partitions. It contains 
multiple Tasks and configuration of tasks, such as how many tasks, timeout per 
task and so on.
+* Workflow is directed acyclic graph represents the relationships and running 
orders of Jobs. In addition, a workflow can also provide customized 
configuration, for example, Job dependencies.
+* JobQueue is another type of Workflow. Different from normal one, JobQueue is 
not terminated until user kill it. Also JobQueue can keep accepting newly 
coming jobs.
+
+### Implement Your Task
+
+#### [Task 
Interface](https://github.com/apache/helix/blob/helix-0.6.x/helix-core/src/main/java/org/apache/helix/task/Task.java)
+
+The task interface contains two methods: run and cancel. User can implement 
his or her own logic in run function and cancel / roll back logic in cancel 
function.
+
+```
+public class MyTask implements Task {
+  @Override
+  TaskResult run() {
+    // Task logic
+  }
+ 
+  @Override
+  void cancel() {
+    // Cancel logic
+  }
+}
+```
+
+#### 
[TaskConfig](https://github.com/apache/helix/blob/helix-0.6.x/helix-core/src/main/java/org/apache/helix/task/TaskConfig.java)
+
+In helix, usually an object config represents the abstraction of that object, 
such as TaskConfig, JobConfig and WorkflowConfig. TaskConfig contains 
configurable task conditions. TaskConfig does not require to have any input to 
create a new object:
+
+```
+TaskConfig taskConfig = new TaskConfig(null, null, null, null);
+```
+
+For these four fields:
+* Command: The task command, will use Job command if this is null
+* ID: Task unique id, will generate a new ID for this task if input is null
+* TaskTargetPartition: Target partition of a target. Could be null
+* ConfigMap: Task property key-value map containing all other property stated 
above, such as command, ID.
+
+#### Share Content Across Tasks and Jobs
+
+Task framework also provides a feature that user can store the key-value data 
per task, job and workflow. The content stored at workflow layer can shared by 
different jobs belong to this workflow. Similarly content persisted at job 
layer can shared by different tasks nested in this job. Currently, user can 
extend the abstract class 
[UserContentStore](https://github.com/apache/helix/blob/helix-0.6.x/helix-core/src/main/java/org/apache/helix/task/UserContentStore.java)
 and use two methods putUserContent and getUserContent. It will similar to hash 
map put and get method except a Scope.  The Scope will define which layer this 
key-value pair to be persisted.
+
+```
+public class MyTask extends UserContentStore implements Task {
+  @Override
+  TaskResult run() {
+    putUserContent("KEY", "WORKFLOWVALUE", SCOPE.WORKFLOW);
+    putUserContent("KEY", "JOBVALUE", SCOPE.JOB);
+    putUserContent("KEY", "TASKVALUE", SCOPE.TASK);
+    String taskValue = getUserContent("KEY", SCOPE.TASK);
+  }
+ ...
+}
+```
+
+#### Return [Task 
Results](https://github.com/apache/helix/blob/helix-0.6.x/helix-core/src/main/java/org/apache/helix/task/TaskResult.java)
+
+User can define the TaskResult for a task once it is at final stage (complete 
or failed). The TaskResult contains two fields: status and info. Status is 
current Task Status including COMPLETED, CANCELLED, FAILED and FATAL_FAILED. 
The difference between FAILED and FATAL_FAILED is that once the task defined as 
FATAL_FAILED, helix will not do the retry for this task and abort it. The other 
field is information, which is a String type. User can pass any information 
including error message, description and so on.
+
+```
+TaskResult run() {
+    ....
+    return new TaskResult(TaskResult.Status.FAILED, "ERROR MESSAGE OR OTHER 
INFORMATION");
+}
+```
+
+#### Task Retry and Abort
+
+Helix provides retry logics to users. User can specify the how many times 
allowed to tolerant failure of tasks under a job. It is a method will be 
introduced in Following Job Section. Another choice offered to user that if 
user thinks a task is very critical and do not want to do the retry once it is 
failed, user can return a TaskResult stated above with FATAL_FAILED status. 
Then Helix will not do the retry for that task.
+
+```
+return new TaskResult(TaskResult.Status.FATAL_FAILED, "DO NOT WANT TO RETRY, 
ERROR MESSAGE");
+```
+
+#### 
[TaskDriver](https://github.com/apache/helix/blob/helix-0.6.x/helix-core/src/main/java/org/apache/helix/task/TaskDriver.java)
+
+All the control operation related to workflow and job are based on TaskDriver 
object. TaskDriver offers several APIs to controller, modify and track the 
tasks. Those APIs will be introduced in each section when they are necessary. 
TaskDriver object can be created either by 
[HelixManager](https://github.com/apache/helix/blob/helix-0.6.x/helix-core/src/main/java/org/apache/helix/HelixManager.java)
 or 
[ZkClient](https://github.com/apache/helix/blob/helix-0.6.x/helix-core/src/main/java/org/apache/helix/manager/zk/ZkClient.java)
 with cluster name:
+
+```
+HelixManager manager = new ZKHelixManager(CLUSTER_NAME, INSTANCE_NAME, 
InstanceType.PARTICIPANT, ZK_ADDRESS);
+TaskDriver taskDriver1 = new TaskDriver(manager);
+ 
+TaskDriver taskDriver2 = new TaskDriver(zkclient, CLUSTER_NAME);
+```
+
+#### Propagate Task Error Message to Helix
+
+When task encounter an error, it could be returned by TaskResult. 
Unfortunately, user can not get this TaskResult object directly. But Helix 
provides error messages persistent. Thus user can fetch the error messages from 
Helix via TaskDriver, which introduced above. The error messages will be stored 
in Info field per Job. Thus user have to get JobContext, which is the job 
status and result object.
+
+```
+taskDriver.getJobContext("JOBNAME").getInfo();
+```
+
+### Creating a Workflow
+
+#### One-time Workflow
+
+As common use, one-time workflow will be the default workflow as user created. 
The first step is to create a WorkflowConfig.Builder object with workflow name. 
Then all configs can be set in WorkflowConfig.Builder. Once the configuration 
is done, 
[WorkflowConfig](https://github.com/apache/helix/blob/helix-0.6.x/helix-core/src/main/java/org/apache/helix/task/WorkflowConfig.java)
 object can be got from WorkflowConfig.Builder object.
+We have two rules to validate the Workflow configuration:
+* Expiry time should not be less than 0
+* Schedule config should be valid either one-time or a positive interval 
magnitude (Recurrent workflow)
+Example:
+
+```
+Workflow.Builder myWorkflowBuilder = new Workflow.Builder("MyWorkflow");
+myWorkflowBuilder.setExpiry(5000L);
+Workflow myWorkflow = myWorkflowBuilder.build();
+```
+
+#### Recurrent Workflow
+
+Recurrent workflow is the workflow scheduled periodically. The only config 
different from One-time workflow is to set a recurrent 
[ScheduleConfig](https://github.com/apache/helix/blob/helix-0.6.x/helix-core/src/main/java/org/apache/helix/task/ScheduleConfig.java).
 There two methods in ScheduleConfig can help you to create a ScheduleConfig 
object: recurringFromNow and recurringFromDate. Both of them needs recurUnit 
(time unit for recurrent) and recurInteval (magnitude of recurrent interval). 
Here's the example:
+
+```
+ScheduleConfig myConfig1 = ScheduleConfig.recurringFFromNow(TimeUnit.MINUTES, 
5L);
+ScheduleConfig myConfig2 = 
ScheduleConfig.recurringFFromDate(Calendar.getInstance.getTime, TimeUnit.HOURS, 
10L);
+```
+
+Once this schedule config is created. It could be set in the workflow config:
+
+```
+Workflow.Builder myWorkflowBuilder = new Workflow.Builder("MyWorkflow");
+myWorkflowBuilder.setExpiry(2000L)
+                 
.setScheduleConfig(ScheduleConfig.recurringFromNow(TimeUnit.DAYS, 5));
+Workflow myWorkflow = myWorkflowBuilder.build();
+```
+
+#### Start a Workflow
+
+Start a workflow is just using taskdrive to start it. Since this is an async 
call, after start the workflow, user can keep doing actions.
+
+```
+taskDriver.start(myWorkflow);
+```
+
+#### Stop a Workflow
+
+Stop workflow can be executed via TaskDriver:
+
+```
+taskDriver.stop(myWorkflow);
+```
+
+#### Resume a Workflow
+
+Once the workflow is stopped, it does not mean the workflow is gone. Thus user 
can resume the workflow that has been stopped. Using TaskDriver resume the 
workflow:
+
+```
+taskDriver.resume(myWorkflow);
+```
+
+#### Delete a Workflow
+
+Simliar to start, stop and resume, delete operation is supported by TaskDriver.
+
+```
+taskDriver.delete(myWorkflow);
+```
+
+#### Add a Job
+
+WARNING: Job can only be added to WorkflowConfig.Builder. Once WorkflowConfig 
built, no job can be added! For creating a Job, please refering following 
section (Create a Job)
+
+```
+myWorkflowBuilder.addJob("JobName", jobConfigBuilder);
+```
+
+#### Add a Job dependency
+
+Jobs can have dependencies. If one job2 depends job1, job2 will not be 
scheduled until job1 finished.
+
+```
+myWorkflowBuilder.addParentChildDependency(ParentJobName, ChildJobName);
+```
+
+#### Additional Workflow Options
+
+| Additional Config Options | Detail |
+| ------------------------- | ------ |
+| _setJobDag(JobDag v)_ | If user already defined the job DAG, it could be set 
with this method. |
+| _setExpiry(long v, TimeUnit unit)_ | Set the expiration time for this 
workflow. |
+| _setFailureThreshold(int failureThreshold)_ | Set the failure threshold for 
this workflow, once job failures reach this number, the workflow will be 
failed. |
+| _setWorkflowType(String workflowType)_ | Set the user defined workflowType 
for this workflow. |
+| _setTerminable(boolean isTerminable)_ | Set the whether this workflow is 
terminable or not. |
+| _setCapacity(int capacity)_ | Set the number of jobs that workflow can hold 
before reject further jobs. Only used when workflow is not terminable. |
+| _setTargetState(TargetState v)_ | Set the final state of this workflow. |
+
+### Creating a Queue
+
+[Job 
queue](https://github.com/apache/helix/blob/helix-0.6.x/helix-core/src/main/java/org/apache/helix/task/JobQueue.java)
 is another shape of workflow. Here listed different between a job queue and 
workflow:
+
+| Property | Workflow | Job Queue |
+| -------- | -------- | --------- |
+| Existing time | Workflow will be deleted after it is done. | Job queue will 
be there until user delete it. |
+| Add jobs | Once workflow is build, no job can be added. | Job queue can keep 
accepting jobs. |
+| Parallel run | Allows parallel run for jobs without dependencies | No 
parallel run allowed except setting _ParallelJobs_ |
+
+For creating a job queue, user have to provide queue name and workflow config 
(please refer above Create a Workflow). Similar to other task object, create a 
JobQueue.Builder first. Then JobQueue can be validated and generated via build 
function.
+
+```
+WorkflowConfig.Builder myWorkflowCfgBuilder = new 
WorkflowConfig.Builder().setWorkFlowType("MyType");
+JobQueue jobQueue = new 
JobQueue.Builder("MyQueueName").setWorkflowConfig(myWorkflowCfgBuilder.build()).build();
+```
+
+####Append Job to Queue
+
+WARNING:Different from normal workflow, job for JobQueue can be append even in 
anytime. Similar to workflow add a job, job can be appended via enqueueJob 
function via TaskDriver.
+
+```
+jobQueueBuilder.enqueueJob("JobName", jobConfigBuilder);
+```
+
+####Delete Job from Queue
+
+Helix allowed user to delete a job from existing queue. We offers delete API 
in TaskDriver to do this. Delete job from queue and this queue has to be 
stopped. Then user can resume the job once delete success.
+
+```
+taskDriver.stop("QueueName");
+taskDriver.deleteJob("QueueName", "JobName");
+taskDriver.resume("QueueName");
+```
+
+####Additional Option for JobQueue
+
+_setParallelJobs(int parallelJobs)_ : Set the how many jobs can parallel 
running, except there is any dependencies.
+
+###Create a Job
+
+Before generate a 
[JobConfig](https://github.com/apache/helix/blob/helix-0.6.x/helix-core/src/main/java/org/apache/helix/task/JobConfig.java)
 object, user still have to use JobConfig.Builder to build JobConfig.
+
+```
+JobConfig.Builder myJobCfgBuilder = new JobConfig.Builder();
+JobConfig myJobCfg = myJobCfgBuilder.build();
+```
+
+Helix has couple rules to validate a job:
+* Each job must at least have one task to execute. For adding tasks and task 
rules please refer following section Add Tasks.
+* Task timeout should not less than zero.
+* Number of concurrent tasks per instances should not less than one.
+* Maximum attempts per task should not less than one
+* There must be a workflow name
+
+#### Add Tasks
+
+There are two ways of adding tasks:
+* Add by TaskConfig. Tasks can be added via adding TaskConfigs. User can 
create a List of TaskConfigs or add TaskConfigMap, which is a task id to 
TaskConfig mapping.
+
+```
+TaskConfig taskCfg = new TaskConfig(null, null, null, null);
+List<TaskConfig> taskCfgs = new ArrayList<TaskConfig>();
+myJobCfg.addTaskConfigs(taskCfgs);
+ 
+Map<String, TaskConfig> taskCfgMap = new HashMap<String, TaskConfig>();
+taskCfgMap.put(taskCfg.getId(), taskCfg);
+myJobCfg.addTaskConfigMap(taskCfgMap);
+```
+
+* Add by Job command. If user does not want to specify each TaskConfig, we can 
create identical tasks based on Job command with number of tasks.
+
+```
+myJobCfg.setCommand("JobCommand").setNumberOfTasks(10);
+```
+WARNING: Either user provides TaskConfigs / TaskConfigMap or both of Job 
command and number tasks (except Targeted Job, refer following section) . 
Otherwise, validation will be failed.
+
+#### Generic Job
+
+Generic Job is the default job created. It does not have targeted resource. 
Thus this generic job could be assigned to one of eligble instances.
+
+#### Targeted Job
+
+Targeted Job has set up the target resource. For this kind of job, Job command 
is necessary, but number of tasks is not. The tasks will depends on the partion 
number of targeted resource. To set target resource, just put target resource 
name to JobConfig.Builder.
+
+```
+myJobCfgBuilder.setTargetResource("TargetResourceName");
+```
+
+In addition, user can specify the instance target state. For example, if user 
want to run the Task on "Master" state instance, setTargetPartitionState method 
can help to set the partition to assign to specific instance.
+
+```
+myJobCfgBuilder.setTargetPartitionState(Arrays.asList(new String[]{"Master", 
"Slave"}));
+```
+
+#### Instance Group
+
+Grouping jobs with targeted group of instances feature has been supported. 
User firstly have to define the instance group tag for instances, which means 
label some instances with specific tag. Then user can put those tags to a job 
that only would like to assigned to those instances. For example, customer data 
only available on instance 1, 2, 3. These three instances can be tagged as 
"CUSTOMER" and  customer data related jobs can set  the instance group tag 
"CUSTOMER". Thus customer data related jobs will only assign to instance 1, 2, 
3. 
+To add instance group tag, just set it in JobConfig.Builder:
+
+```
+jobCfg.setInstanceGroupTag("INSTANCEGROUPTAG");
+```
+
+#### Additional Job Options
+
+| Operation | Detail |
+| --------- | ------ |
+| _setWorkflow(String workflowName)_ | Set the workflow that this job belongs 
to |
+| _setTargetPartions(List\<String\> targetPartionNames)_ | Set list of 
partition names |
+| _setTargetPartionStates(Set\<String\>)_ | Set the partition states |
+| _setCommand(String command)_ | Set the job command |
+| _setJobCommandConfigMap(Map\<String, String\> v)_ | Set the job command 
config maps |
+| _setTimeoutPerTask(long v)_ | Set the timeout for each task |
+| _setNumConcurrentTasksPerInstance(int v)_ | Set number of tasks can 
concurrent run on same instance |
+| _setMaxAttemptsPerTask(int v)_ | Set times of retry for a task |
+| _setFailureThreshold(int v)_ | Set failure tolerance of tasks for this job |
+| _setTaskRetryDelay(long v)_ | Set the delay time before a task retry |
+| _setIgnoreDependentJobFailure(boolean ignoreDependentJobFailure)_ | Set 
whether ignore the job failure of parent job of this job |
+| _setJobType(String jobType)_ | Set the job type of this job |
+
+### Monitor the status of your job
+As we introduced the excellent util TaskDriver in Workflow Section, we have 
extra more functionality that provided to user. The user can synchronized wait 
Job or Workflow until it reaches certain STATES. The function Helix have API 
pollForJobState and pollForWorkflowState. For pollForJobState, it accepts 
arguments:
+* Workflow name, required
+* Job name, required
+* Timeout, not required, will be three minutes if user choose function without 
timeout argument. Time unit is milisecond.
+* TaskStates, at least one state. This function can accept multiple TaskState, 
will end function until one of those TaskState reaches.
+For example:
+
+```
+taskDriver.pollForJobState("MyWorkflowName", "MyJobName", 180000L, 
TaskState.FAILED, TaskState.FATAL_FAILED);
+taskDriver.pollForJobState("MyWorkflowName", "MyJobName", TaskState.COMPLETED);
+```
+
+For pollForWorkflowState, it accepts similar arguments except Job name. For 
example:
+
+```
+taskDriver.pollForWorkflowState("MyWorkflowName", 180000L, TaskState.FAILED, 
TaskState.FATAL_FAILED);
+taskDriver.pollForWorkflowState("MyWorkflowName", TaskState.COMPLETED);
+```

http://git-wip-us.apache.org/repos/asf/helix/blob/39e0d3fb/website/0.6.7/src/site/markdown/tutorial_throttling.md
----------------------------------------------------------------------
diff --git a/website/0.6.7/src/site/markdown/tutorial_throttling.md 
b/website/0.6.7/src/site/markdown/tutorial_throttling.md
new file mode 100644
index 0000000..16a6f81
--- /dev/null
+++ b/website/0.6.7/src/site/markdown/tutorial_throttling.md
@@ -0,0 +1,39 @@
+<!---
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<head>
+  <title>Tutorial - Throttling</title>
+</head>
+
+## [Helix Tutorial](./Tutorial.html): Throttling
+
+In this chapter, we\'ll learn how to control the parallel execution of cluster 
tasks.  Only a centralized cluster manager with global knowledge (i.e. Helix) 
is capable of coordinating this decision.
+
+### Throttling
+
+Since all state changes in the system are triggered through transitions, Helix 
can control the number of transitions that can happen in parallel. Some of the 
transitions may be lightweight, but some might involve moving data, which is 
quite expensive from a network and IOPS perspective.
+
+Helix allows applications to set a threshold on transitions. The threshold can 
be set at multiple scopes:
+
+* MessageType e.g STATE_TRANSITION
+* TransitionType e.g SLAVE-MASTER
+* Resource e.g database
+* Node i.e per-node maximum transitions in parallel
+
+

http://git-wip-us.apache.org/repos/asf/helix/blob/39e0d3fb/website/0.6.7/src/site/markdown/tutorial_user_def_rebalancer.md
----------------------------------------------------------------------
diff --git a/website/0.6.7/src/site/markdown/tutorial_user_def_rebalancer.md 
b/website/0.6.7/src/site/markdown/tutorial_user_def_rebalancer.md
new file mode 100644
index 0000000..2149739
--- /dev/null
+++ b/website/0.6.7/src/site/markdown/tutorial_user_def_rebalancer.md
@@ -0,0 +1,172 @@
+<!---
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<head>
+  <title>Tutorial - User-Defined Rebalancing</title>
+</head>
+
+## [Helix Tutorial](./Tutorial.html): User-Defined Rebalancing
+
+Even though Helix can compute both the location and the state of replicas 
internally using a default fully-automatic rebalancer, specific applications 
may require rebalancing strategies that optimize for different requirements. 
Thus, Helix allows applications to plug in arbitrary rebalancer algorithms that 
implement a provided interface. One of the main design goals of Helix is to 
provide maximum flexibility to any distributed application. Thus, it allows 
applications to fully implement the rebalancer, which is the core constraint 
solver in the system, if the application developer so chooses.
+
+Whenever the state of the cluster changes, as is the case when participants 
join or leave the cluster, Helix automatically calls the rebalancer to compute 
a new mapping of all the replicas in the resource. When using a pluggable 
rebalancer, the only required step is to register it with Helix. Subsequently, 
no additional bootstrapping steps are necessary. Helix uses reflection to look 
up and load the class dynamically at runtime. As a result, it is also 
technically possible to change the rebalancing strategy used at any time.
+
+The Rebalancer interface is as follows:
+
+```
+void init(HelixManager manager);
+
+IdealState computeNewIdealState(String resourceName, IdealState 
currentIdealState,
+    final CurrentStateOutput currentStateOutput, final ClusterDataCache 
clusterData);
+```
+The first parameter is the resource to rebalance, the second is pre-existing 
ideal mappings, the third is a snapshot of the actual placements and state 
assignments, and the fourth is a full cache of all of the cluster data 
available to Helix. Internally, Helix implements the same interface for its own 
rebalancing routines, so a user-defined rebalancer will be cognizant of the 
same information about the cluster as an internal implementation. Helix strives 
to provide applications the ability to implement algorithms that may require a 
large portion of the entire state of the cluster to make the best placement and 
state assignment decisions possible.
+
+An IdealState is a full representation of the location of each replica of each 
partition of a given resource. This is a simple representation of the placement 
that the algorithm believes is the best possible. If the placement meets all 
defined constraints, this is what will become the actual state of the 
distributed system.
+
+### Specifying a Rebalancer
+For implementations that set up the cluster through existing code, the 
following HelixAdmin calls will update the Rebalancer class:
+
+```
+IdealState idealState = helixAdmin.getResourceIdealState(clusterName, 
resourceName);
+idealState.setRebalanceMode(RebalanceMode.USER_DEFINED);
+idealState.setRebalancerClassName(className);
+helixAdmin.setResourceIdealState(clusterName, resourceName, idealState);
+```
+
+There are two key fields to set to specify that a pluggable rebalancer should 
be used. First, the rebalance mode should be set to USER_DEFINED, and second 
the rebalancer class name should be set to a class that implements Rebalancer 
and is within the scope of the project. The class name is a fully-qualified 
class name consisting of its package and its name. Without specification of the 
USER_DEFINED mode, the user-defined rebalancer class will not be used even if 
specified. Furthermore, Helix will not attempt to rebalance the resources 
through its standard routines if its mode is USER_DEFINED, regardless of 
whether or not a rebalancer class is registered.
+
+### Example
+
+In the next release (0.7.0), we will provide a full recipe of a user-defined 
rebalancer in action.
+
+Consider the case where partitions are locks in a lock manager and 6 locks are 
to be distributed evenly to a set of participants, and only one participant can 
hold each lock. We can define a rebalancing algorithm that simply takes the 
modulus of the lock number and the number of participants to evenly distribute 
the locks across participants. Helix allows capping the number of partitions a 
participant can accept, but since locks are lightweight, we do not need to 
define a restriction in this case. The following is a succinct implementation 
of this algorithm.
+
+```
+@Override
+IdealState computeNewIdealState(String resourceName, IdealState 
currentIdealState,
+    final CurrentStateOutput currentStateOutput, final ClusterDataCache 
clusterData) {
+  // Get the list of live participants in the cluster
+  List<String> liveParticipants = new 
ArrayList<String>(clusterData.getLiveInstances().keySet());
+
+  // Count the number of participants allowed to lock each lock (in this 
example, this is 1)
+  int lockHolders = Integer.parseInt(currentIdealState.getReplicas());
+
+  // Fairly assign the lock state to the participants using a simple mod-based 
sequential
+  // assignment. For instance, if each lock can be held by 3 participants, 
lock 0 would be held
+  // by participants (0, 1, 2), lock 1 would be held by (1, 2, 3), and so on, 
wrapping around the
+  // number of participants as necessary.
+  int i = 0;
+  for (String partition : currentIdealState.getPartitionSet()) {
+    List<String> preferenceList = new ArrayList<String>();
+    for (int j = i; j < i + lockHolders; j++) {
+      int participantIndex = j % liveParticipants.size();
+      String participant = liveParticipants.get(participantIndex);
+      // enforce that a participant can only have one instance of a given lock
+      if (!preferenceList.contains(participant)) {
+        preferenceList.add(participant);
+      }
+    }
+    currentIdealState.setPreferenceList(partition, preferenceList);
+    i++;
+  }
+  return assignment;
+}
+```
+
+Here are the IdealState preference lists emitted by the user-defined 
rebalancer for a 3-participant system whenever there is a change to the set of 
participants.
+
+* Participant_A joins
+
+```
+{
+  "lock_0": ["Participant_A"],
+  "lock_1": ["Participant_A"],
+  "lock_2": ["Participant_A"],
+  "lock_3": ["Participant_A"],
+  "lock_4": ["Participant_A"],
+  "lock_5": ["Participant_A"],
+}
+```
+
+A preference list is a mapping for each resource of partition to the 
participants serving each replica. The state model is a simple LOCKED/RELEASED 
model, so participant A holds all lock partitions in the LOCKED state.
+
+* Participant_B joins
+
+```
+{
+  "lock_0": ["Participant_A"],
+  "lock_1": ["Participant_B"],
+  "lock_2": ["Participant_A"],
+  "lock_3": ["Participant_B"],
+  "lock_4": ["Participant_A"],
+  "lock_5": ["Participant_B"],
+}
+```
+
+Now that there are two participants, the simple mod-based function assigns 
every other lock to the second participant. On any system change, the 
rebalancer is invoked so that the application can define how to redistribute 
its resources.
+
+* Participant_C joins (steady state)
+
+```
+{
+  "lock_0": ["Participant_A"],
+  "lock_1": ["Participant_B"],
+  "lock_2": ["Participant_C"],
+  "lock_3": ["Participant_A"],
+  "lock_4": ["Participant_B"],
+  "lock_5": ["Participant_C"],
+}
+```
+
+This is the steady state of the system. Notice that four of the six locks now 
have a different owner. That is because of the naïve modulus-based assignmemt 
approach used by the user-defined rebalancer. However, the interface is 
flexible enough to allow you to employ consistent hashing or any other scheme 
if minimal movement is a system requirement.
+
+* Participant_B fails
+
+```
+{
+  "lock_0": ["Participant_A"],
+  "lock_1": ["Participant_C"],
+  "lock_2": ["Participant_A"],
+  "lock_3": ["Participant_C"],
+  "lock_4": ["Participant_A"],
+  "lock_5": ["Participant_C"],
+}
+```
+
+On any node failure, as in the case of node addition, the rebalancer is 
invoked automatically so that it can generate a new mapping as a response to 
the change. Helix ensures that the Rebalancer has the opportunity to reassign 
locks as required by the application.
+
+* Participant_B (or the replacement for the original Participant_B) rejoins
+
+```
+{
+  "lock_0": ["Participant_A"],
+  "lock_1": ["Participant_B"],
+  "lock_2": ["Participant_C"],
+  "lock_3": ["Participant_A"],
+  "lock_4": ["Participant_B"],
+  "lock_5": ["Participant_C"],
+}
+```
+
+The rebalancer was invoked once again and the resulting IdealState preference 
lists reflect the steady state.
+
+### Caveats
+- The rebalancer class must be available at runtime, or else Helix will not 
attempt to rebalance at all
+- The Helix controller will only take into account the preference lists in the 
new IdealState for this release. In 0.7.0, Helix rebalancers will be able to 
compute the full resource assignment, including the states.
+- Helix does not currently persist the new IdealState computed by the 
user-defined rebalancer. However, the Helix property store is available for 
saving any computed state. In 0.7.0, Helix will persist the result of running 
the rebalancer.

http://git-wip-us.apache.org/repos/asf/helix/blob/39e0d3fb/website/0.6.7/src/site/markdown/tutorial_yaml.md
----------------------------------------------------------------------
diff --git a/website/0.6.7/src/site/markdown/tutorial_yaml.md 
b/website/0.6.7/src/site/markdown/tutorial_yaml.md
new file mode 100644
index 0000000..1e4772e
--- /dev/null
+++ b/website/0.6.7/src/site/markdown/tutorial_yaml.md
@@ -0,0 +1,102 @@
+<!---
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<head>
+  <title>Tutorial - YAML Cluster Setup</title>
+</head>
+
+## [Helix Tutorial](./Tutorial.html): YAML Cluster Setup
+
+As an alternative to using Helix Admin to set up the cluster, its resources, 
constraints, and the state model, Helix supports bootstrapping a cluster 
configuration based on a YAML file. Below is an annotated example of such a 
file for a simple distributed lock manager where a lock can only be LOCKED or 
RELEASED, and each lock only allows a single participant to hold it in the 
LOCKED state.
+
+```
+clusterName: lock-manager-custom-rebalancer # unique name for the cluster 
(required)
+resources:
+  - name: lock-group # unique resource name (required)
+    rebalancer: # required
+      mode: USER_DEFINED # required - USER_DEFINED means we will provide our 
own rebalancer
+      class: org.apache.helix.userdefinedrebalancer.LockManagerRebalancer # 
required for USER_DEFINED
+    partitions:
+      count: 12 # number of partitions for the resource (default is 1)
+      replicas: 1 # number of replicas per partition (default is 1)
+    stateModel:
+      name: lock-unlock # model name (required)
+      states: [LOCKED, RELEASED, DROPPED] # the list of possible states 
(required if model not built-in)
+      transitions: # the list of possible transitions (required if model not 
built-in)
+        - name: Unlock
+          from: LOCKED
+          to: RELEASED
+        - name: Lock
+          from: RELEASED
+          to: LOCKED
+        - name: DropLock
+          from: LOCKED
+          to: DROPPED
+        - name: DropUnlock
+          from: RELEASED
+          to: DROPPED
+        - name: Undrop
+          from: DROPPED
+          to: RELEASED
+      initialState: RELEASED # (required if model not built-in)
+    constraints:
+      state:
+        counts: # maximum number of replicas of a partition that can be in 
each state (required if model not built-in)
+          - name: LOCKED
+            count: "1"
+          - name: RELEASED
+            count: "-1"
+          - name: DROPPED
+            count: "-1"
+        priorityList: [LOCKED, RELEASED, DROPPED] # states in order of 
priority (all priorities equal if not specified)
+      transition: # transitions priority to enforce order that transitions 
occur
+        priorityList: [Unlock, Lock, Undrop, DropUnlock, DropLock] # all 
priorities equal if not specified
+participants: # list of nodes that can serve replicas (optional if dynamic 
joining is active, required otherwise)
+  - name: localhost_12001
+    host: localhost
+    port: 12001
+  - name: localhost_12002
+    host: localhost
+    port: 12002
+  - name: localhost_12003
+    host: localhost
+    port: 12003
+```
+
+Using a file like the one above, the cluster can be set up either with the 
command line:
+
+```
+helix/helix-core/target/helix-core/pkg/bin/YAMLClusterSetup.sh localhost:2199 
lock-manager-config.yaml
+```
+
+or with code:
+
+```
+YAMLClusterSetup setup = new YAMLClusterSetup(zkAddress);
+InputStream input =
+    Thread.currentThread().getContextClassLoader()
+        .getResourceAsStream("lock-manager-config.yaml");
+YAMLClusterSetup.YAMLClusterConfig config = setup.setupCluster(input);
+```
+
+Some notes:
+
+- A rebalancer class is only required for the USER_DEFINED mode. It is ignored 
otherwise.
+
+- Built-in state models, like OnlineOffline, LeaderStandby, and MasterSlave, 
or state models that have already been added only require a name for 
stateModel. If partition and/or replica counts are not provided, a value of 1 
is assumed.

http://git-wip-us.apache.org/repos/asf/helix/blob/39e0d3fb/website/0.6.7/src/site/resources/.htaccess
----------------------------------------------------------------------
diff --git a/website/0.6.7/src/site/resources/.htaccess 
b/website/0.6.7/src/site/resources/.htaccess
new file mode 100644
index 0000000..d5c7bf3
--- /dev/null
+++ b/website/0.6.7/src/site/resources/.htaccess
@@ -0,0 +1,20 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+Redirect /download.html /download.cgi

http://git-wip-us.apache.org/repos/asf/helix/blob/39e0d3fb/website/0.6.7/src/site/resources/download.cgi
----------------------------------------------------------------------
diff --git a/website/0.6.7/src/site/resources/download.cgi 
b/website/0.6.7/src/site/resources/download.cgi
new file mode 100755
index 0000000..f9a0e30
--- /dev/null
+++ b/website/0.6.7/src/site/resources/download.cgi
@@ -0,0 +1,22 @@
+#!/bin/sh
+# Just call the standard mirrors.cgi script. It will use download.html
+# as the input template.
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+exec /www/www.apache.org/dyn/mirrors/mirrors.cgi $*

http://git-wip-us.apache.org/repos/asf/helix/blob/39e0d3fb/website/0.6.7/src/site/resources/images/PFS-Generic.png
----------------------------------------------------------------------
diff --git a/website/0.6.7/src/site/resources/images/PFS-Generic.png 
b/website/0.6.7/src/site/resources/images/PFS-Generic.png
new file mode 100644
index 0000000..7eea3a0
Binary files /dev/null and 
b/website/0.6.7/src/site/resources/images/PFS-Generic.png differ

http://git-wip-us.apache.org/repos/asf/helix/blob/39e0d3fb/website/0.6.7/src/site/resources/images/RSYNC_BASED_PFS.png
----------------------------------------------------------------------
diff --git a/website/0.6.7/src/site/resources/images/RSYNC_BASED_PFS.png 
b/website/0.6.7/src/site/resources/images/RSYNC_BASED_PFS.png
new file mode 100644
index 0000000..0cc55ae
Binary files /dev/null and 
b/website/0.6.7/src/site/resources/images/RSYNC_BASED_PFS.png differ

http://git-wip-us.apache.org/repos/asf/helix/blob/39e0d3fb/website/0.6.7/src/site/resources/images/TaskFrameworkLayers.png
----------------------------------------------------------------------
diff --git a/website/0.6.7/src/site/resources/images/TaskFrameworkLayers.png 
b/website/0.6.7/src/site/resources/images/TaskFrameworkLayers.png
new file mode 100644
index 0000000..4ee24a8
Binary files /dev/null and 
b/website/0.6.7/src/site/resources/images/TaskFrameworkLayers.png differ

http://git-wip-us.apache.org/repos/asf/helix/blob/39e0d3fb/website/0.6.7/src/site/site.xml
----------------------------------------------------------------------
diff --git a/website/0.6.7/src/site/site.xml b/website/0.6.7/src/site/site.xml
new file mode 100644
index 0000000..3753eb9
--- /dev/null
+++ b/website/0.6.7/src/site/site.xml
@@ -0,0 +1,140 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<project name="Apache Helix">
+  <bannerLeft>
+    <src>../images/helix-logo.jpg</src>
+    <href>http://helix.apache.org/</href>
+  </bannerLeft>
+  <bannerRight>
+    <src>../images/feather_small.gif</src>
+    <href>http://www.apache.org/</href>
+  </bannerRight>
+  <version position="none"/>
+
+  <publishDate position="right"/>
+
+  <skin>
+    <groupId>lt.velykis.maven.skins</groupId>
+    <artifactId>reflow-maven-skin</artifactId>
+    <version>1.0.0</version>
+  </skin>
+
+  <body>
+
+    <head>
+      <script type="text/javascript">
+
+        var _gaq = _gaq || [];
+        _gaq.push(['_setAccount', 'UA-3211522-12']);
+        _gaq.push(['_trackPageview']);
+
+        (function() {
+        var ga = document.createElement('script'); ga.type = 
'text/javascript'; ga.async = true;
+        ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 
'http://www') + '.google-analytics.com/ga.js';
+        var s = document.getElementsByTagName('script')[0]; 
s.parentNode.insertBefore(ga, s);
+        })();
+
+      </script>
+
+    </head>
+
+    <breadcrumbs position="left">
+      <item name="Apache Helix" href="http://helix.apache.org/"/>
+      <item name="Release 0.6.7" href="http://helix.apache.org/0.6.7-docs/"/>
+    </breadcrumbs>
+
+    <links>
+      <item name="Helix 0.6.7" href="./index.html"/>
+    </links>
+
+    <menu name="Get Helix">
+      <item name="Download" href="./download.html"/>
+      <item name="Building" href="./Building.html"/>
+      <item name="Release Notes" href="./releasenotes/release-0.6.7.html"/>
+    </menu>
+
+    <menu name="Hands-On">
+      <item name="Quick Start" href="./Quickstart.html"/>
+      <item name="Tutorial" href="./Tutorial.html"/>
+      <item name="Javadocs" href="http://helix.apache.org/javadocs/0.6.7"/>
+    </menu>
+
+    <menu name="Recipes">
+      <item name="Distributed lock manager" 
href="./recipes/lock_manager.html"/>
+      <item name="Rabbit MQ consumer group" 
href="./recipes/rabbitmq_consumer_group.html"/>
+      <item name="Rsync replicated file store" 
href="./recipes/rsync_replicated_file_store.html"/>
+      <item name="Service discovery" href="./recipes/service_discovery.html"/>
+      <item name="Distributed task DAG execution" 
href="./recipes/task_dag_execution.html"/>
+    </menu>
+<!--
+    <menu ref="reports" inherit="bottom"/>
+    <menu ref="modules" inherit="bottom"/>
+
+
+    <menu name="ASF">
+      <item name="How Apache Works" 
href="http://www.apache.org/foundation/how-it-works.html"/>
+      <item name="Foundation" href="http://www.apache.org/foundation/"/>
+      <item name="Sponsoring Apache" 
href="http://www.apache.org/foundation/sponsorship.html"/>
+      <item name="Thanks" href="http://www.apache.org/foundation/thanks.html"/>
+    </menu>
+-->
+    <footer>
+      <div class="row span16"><div>Apache Helix, Apache, the Apache feather 
logo, and the Apache Helix project logos are trademarks of The Apache Software 
Foundation.
+        All other marks mentioned may be trademarks or registered trademarks 
of their respective owners.</div>
+        <a href="${project.url}/privacy-policy.html">Privacy Policy</a>
+      </div>
+    </footer>
+
+
+  </body>
+
+  <custom>
+    <reflowSkin>
+      <theme>default</theme>
+      <highlightJs>false</highlightJs>
+      <brand>
+        <name>Apache Helix</name>
+        <href>http://helix.apache.org</href>
+      </brand>
+      <slogan>A cluster management framework for partitioned and replicated 
distributed resources</slogan>
+      <bottomNav>
+        <column>Get Helix</column>
+        <column>Hands-On</column>
+        <column>Recipes</column>
+      </bottomNav>
+      <pages>
+        <index>
+          <sections>
+            <columns>3</columns>
+          </sections>
+        </index>
+      </pages>
+    </reflowSkin>
+    <!--fluidoSkin>
+      <topBarEnabled>true</topBarEnabled>
+      <sideBarEnabled>true</sideBarEnabled>
+      <googleSearch></googleSearch>
+      <twitter>
+        <user>ApacheHelix</user>
+        <showUser>true</showUser>
+        <showFollowers>false</showFollowers>
+      </twitter>
+    </fluidoSkin-->
+  </custom>
+
+</project>

http://git-wip-us.apache.org/repos/asf/helix/blob/39e0d3fb/website/0.6.7/src/site/xdoc/download.xml.vm
----------------------------------------------------------------------
diff --git a/website/0.6.7/src/site/xdoc/download.xml.vm 
b/website/0.6.7/src/site/xdoc/download.xml.vm
new file mode 100644
index 0000000..9f3af91
--- /dev/null
+++ b/website/0.6.7/src/site/xdoc/download.xml.vm
@@ -0,0 +1,214 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+
+-->
+#set( $releaseName = "0.6.7" )
+#set( $releaseDate = "01/20/2017" )
+<document xmlns="http://maven.apache.org/XDOC/2.0"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
+          xsi:schemaLocation="http://maven.apache.org/XDOC/2.0 
http://maven.apache.org/xsd/xdoc-2.0.xsd";>
+
+  <properties>
+    <title>Apache Helix Downloads</title>
+    <author email="[email protected]">Apache Helix Documentation 
Team</author>
+  </properties>
+
+  <body>
+    <div class="toc_container">
+      <macro name="toc">
+        <param name="class" value="toc"/>
+      </macro>
+    </div>
+
+    <section name="Introduction">
+      <p>Apache Helix artifacts are distributed in source and binary form 
under the terms of the
+        <a href="http://www.apache.org/licenses/LICENSE-2.0";>Apache License, 
Version 2.0</a>.
+        See the included <tt>LICENSE</tt> and <tt>NOTICE</tt> files included 
in each artifact for additional license
+        information.
+      </p>
+      <p>Use the links below to download a source distribution of Apache Helix.
+      It is good practice to <a href="#Verifying_Releases">verify the 
integrity</a> of the distribution files.</p>
+    </section>
+
+    <section name="Release">
+      <p>Release date: ${releaseDate} </p>
+      <p><a href="releasenotes/release-${releaseName}.html">${releaseName} 
Release notes</a></p>
+      <a name="mirror"/>
+      <subsection name="Mirror">
+
+        <p>
+          [if-any logo]
+          <a href="[link]">
+            <img align="right" src="[logo]" border="0"
+                 alt="logo"/>
+          </a>
+          [end]
+          The currently selected mirror is
+          <b>[preferred]</b>.
+          If you encounter a problem with this mirror,
+          please select another mirror.
+          If all mirrors are failing, there are
+          <i>backup</i>
+          mirrors
+          (at the end of the mirrors list) that should be available.
+        </p>
+
+        <form action="[location]" method="get" id="SelectMirror" 
class="form-inline">
+          Other mirrors:
+          <select name="Preferred" class="input-xlarge">
+            [if-any http]
+            [for http]
+            <option value="[http]">[http]</option>
+            [end]
+            [end]
+            [if-any ftp]
+            [for ftp]
+            <option value="[ftp]">[ftp]</option>
+            [end]
+            [end]
+            [if-any backup]
+            [for backup]
+            <option value="[backup]">[backup] (backup)</option>
+            [end]
+            [end]
+          </select>
+          <input type="submit" value="Change" class="btn"/>
+        </form>
+
+        <p>
+          You may also consult the
+          <a href="http://www.apache.org/mirrors/";>complete list of 
mirrors.</a>
+        </p>
+
+      </subsection>
+      <subsection name="${releaseName} Sources">
+        <table>
+          <thead>
+            <tr>
+              <th>Artifact</th>
+              <th>Signatures</th>
+              <th>Hashes</th>
+            </tr>
+          </thead>
+          <tbody>
+            <tr>
+              <td>
+                <a 
href="[preferred]helix/${releaseName}/src/helix-${releaseName}-src.zip">helix-${releaseName}-src.zip</a>
+              </td>
+              <td>
+                <a 
href="http://www.apache.org/dist/helix/${releaseName}/src/helix-${releaseName}-src.zip.asc";>asc</a>
+              </td>
+              <td>
+                <a 
href="http://www.apache.org/dist/helix/${releaseName}/src/helix-${releaseName}-src.zip.md5";>md5</a>
+                <a 
href="http://www.apache.org/dist/helix/${releaseName}/src/helix-${releaseName}-src.zip.sha1";>sha1</a>
+              </td>
+            </tr>
+          </tbody>
+        </table>
+      </subsection>
+      <subsection name="${releaseName} Binaries">
+        <table>
+          <thead>
+            <tr>
+              <th>Artifact</th>
+              <th>Signatures</th>
+              <th>Hashes</th>
+            </tr>
+          </thead>
+          <tbody>
+            <tr>
+              <td>
+                <a 
href="[preferred]helix/${releaseName}/binaries/helix-core-${releaseName}-pkg.tar">helix-core-${releaseName}-pkg.tar</a>
+              </td>
+              <td>
+                <a 
href="http://www.apache.org/dist/helix/${releaseName}/binaries/helix-core-${releaseName}-pkg.tar.asc";>asc</a>
+              </td>
+              <td>
+                <a 
href="http://www.apache.org/dist/helix/${releaseName}/binaries/helix-core-${releaseName}-pkg.tar.md5";>md5</a>
+                <a 
href="http://www.apache.org/dist/helix/${releaseName}/binaries/helix-core-${releaseName}-pkg.tar.sha1";>sha1</a>
+              </td>
+            </tr>
+            <tr>
+              <td>
+                <a 
href="[preferred]helix/${releaseName}/binaries/helix-admin-webapp-${releaseName}-pkg.tar">helix-admin-webapp-${releaseName}-pkg.tar</a>
+              </td>
+              <td>
+                <a 
href="http://www.apache.org/dist/helix/${releaseName}/binaries/helix-admin-webapp-${releaseName}-pkg.tar.asc";>asc</a>
+              </td>
+              <td>
+                <a 
href="http://www.apache.org/dist/helix/${releaseName}/binaries/helix-admin-webapp-${releaseName}-pkg.tar.md5";>md5</a>
+                <a 
href="http://www.apache.org/dist/helix/${releaseName}/binaries/helix-admin-webapp-${releaseName}-pkg.tar.sha1";>sha1</a>
+              </td>
+            </tr>
+            <tr>
+              <td>
+                <a 
href="[preferred]helix/${releaseName}/binaries/helix-agent-${releaseName}-pkg.tar">helix-agent-${releaseName}-pkg.tar</a>
+              </td>
+              <td>
+                <a 
href="http://www.apache.org/dist/helix/${releaseName}/binaries/helix-agent-${releaseName}-pkg.tar.asc";>asc</a>
+              </td>
+              <td>
+                <a 
href="http://www.apache.org/dist/helix/${releaseName}/binaries/helix-agent-${releaseName}-pkg.tar.md5";>md5</a>
+                <a 
href="http://www.apache.org/dist/helix/${releaseName}/binaries/helix-agent-${releaseName}-pkg.tar.sha1";>sha1</a>
+              </td>
+            </tr>
+          </tbody>
+        </table>
+      </subsection>
+    </section>
+
+<!--    <section name="Older Releases">
+    </section>-->
+
+    <section name="Verifying Releases">
+      <p>It is essential that you verify the integrity of the downloaded file 
using the PGP signature (<tt>.asc</tt> file) or a hash (<tt>.md5</tt> or 
<tt>.sha1</tt> file). Please read <a 
href="http://www.apache.org/info/verification.html";>Verifying Apache Software 
Foundation Releases</a> for more information on why you should verify our 
releases.</p>
+      <p>The PGP signature can be verified using <a 
href="http://www.pgpi.org/";>PGP</a> or <a href="http://www.gnupg.org/";>GPG</a>. 
First download the <a href="http://www.apache.org/dist/helix/KEYS";>KEYS</a> as 
well as the <tt>*.asc</tt> signature files for the relevant distribution. Make 
sure you get these files from the main distribution site, rather than from a 
mirror. Then verify the signatures using one of the following sets of commands:
+
+        <source>% pgpk -a KEYS
+% pgpv downloaded_file.asc</source>
+
+      or<br/>
+
+        <source>% pgp -ka KEYS
+% pgp downloaded_file.asc</source>
+
+      or<br/>
+
+        <source>% gpg --import KEYS
+% gpg --verify downloaded_file.asc</source>
+       </p>
+    <p>Alternatively, you can verify the MD5 signature on the files. A 
Unix/Linux program called
+      <code>md5</code> or
+      <code>md5sum</code> is included in most distributions.  It is also 
available as part of
+      <a href="http://www.gnu.org/software/textutils/textutils.html";>GNU 
Textutils</a>.
+      Windows users can get binary md5 programs from these (and likely other) 
places:
+      <ul>
+        <li>
+          <a href="http://www.md5summer.org/";>http://www.md5summer.org/</a>
+        </li>
+        <li>
+          <a 
href="http://www.fourmilab.ch/md5/";>http://www.fourmilab.ch/md5/</a>
+        </li>
+        <li>
+          <a 
href="http://www.pc-tools.net/win32/md5sums/";>http://www.pc-tools.net/win32/md5sums/</a>
+        </li>
+      </ul>
+    </p>
+    </section>
+  </body>
+</document>

http://git-wip-us.apache.org/repos/asf/helix/blob/39e0d3fb/website/0.6.7/src/test/conf/testng.xml
----------------------------------------------------------------------
diff --git a/website/0.6.7/src/test/conf/testng.xml 
b/website/0.6.7/src/test/conf/testng.xml
new file mode 100644
index 0000000..58f0803
--- /dev/null
+++ b/website/0.6.7/src/test/conf/testng.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd";>
+<suite name="Suite" parallel="none">
+  <test name="Test" preserve-order="false">
+    <packages>
+      <package name="org.apache.helix"/>
+    </packages>
+  </test>
+</suite>

http://git-wip-us.apache.org/repos/asf/helix/blob/39e0d3fb/website/0.6.8/pom.xml
----------------------------------------------------------------------
diff --git a/website/0.6.8/pom.xml b/website/0.6.8/pom.xml
new file mode 100644
index 0000000..59fcf2c
--- /dev/null
+++ b/website/0.6.8/pom.xml
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/maven-v4_0_0.xsd";>
+  <modelVersion>4.0.0</modelVersion>
+
+  <parent>
+    <groupId>org.apache.helix</groupId>
+    <artifactId>website</artifactId>
+    <version>0.7.2-SNAPSHOT</version>
+  </parent>
+
+  <artifactId>0.6.8-docs</artifactId>
+  <packaging>bundle</packaging>
+  <name>Apache Helix :: Website :: 0.6.8</name>
+
+  <properties>
+  </properties>
+
+  <dependencies>
+    <dependency>
+      <groupId>org.testng</groupId>
+      <artifactId>testng</artifactId>
+      <version>6.0.1</version>
+    </dependency>
+  </dependencies>
+  <build>
+    <pluginManagement>
+      <plugins>
+      </plugins>
+    </pluginManagement>
+    <plugins>
+    </plugins>
+  </build>
+</project>

http://git-wip-us.apache.org/repos/asf/helix/blob/39e0d3fb/website/0.6.8/src/site/apt/privacy-policy.apt
----------------------------------------------------------------------
diff --git a/website/0.6.8/src/site/apt/privacy-policy.apt 
b/website/0.6.8/src/site/apt/privacy-policy.apt
new file mode 100644
index 0000000..ada9363
--- /dev/null
+++ b/website/0.6.8/src/site/apt/privacy-policy.apt
@@ -0,0 +1,52 @@
+ ----
+ Privacy Policy
+ -----
+ Olivier Lamy
+ -----
+ 2013-02-04
+ -----
+
+~~ Licensed to the Apache Software Foundation (ASF) under one
+~~ or more contributor license agreements.  See the NOTICE file
+~~ distributed with this work for additional information
+~~ regarding copyright ownership.  The ASF licenses this file
+~~ to you under the Apache License, Version 2.0 (the
+~~ "License"); you may not use this file except in compliance
+~~ with the License.  You may obtain a copy of the License at
+~~
+~~   http://www.apache.org/licenses/LICENSE-2.0
+~~
+~~ Unless required by applicable law or agreed to in writing,
+~~ software distributed under the License is distributed on an
+~~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+~~ KIND, either express or implied.  See the License for the
+~~ specific language governing permissions and limitations
+~~ under the License.
+
+Privacy Policy
+
+  Information about your use of this website is collected using server access 
logs and a tracking cookie. The 
+  collected information consists of the following:
+
+  [[1]] The IP address from which you access the website;
+  
+  [[2]] The type of browser and operating system you use to access our site;
+  
+  [[3]] The date and time you access our site;
+  
+  [[4]] The pages you visit; and
+  
+  [[5]] The addresses of pages from where you followed a link to our site.
+
+  []
+
+  Part of this information is gathered using a tracking cookie set by the 
+  {{{http://www.google.com/analytics/}Google Analytics}} service and handled 
by Google as described in their 
+  {{{http://www.google.com/privacy.html}privacy policy}}. See your browser 
documentation for instructions on how to 
+  disable the cookie if you prefer not to share this data with Google.
+
+  We use the gathered information to help us make our site more useful to 
visitors and to better understand how and 
+  when our site is used. We do not track or collect personally identifiable 
information or associate gathered data 
+  with any personally identifying information from other sources.
+
+  By using this website, you consent to the collection of this data in the 
manner and for the purpose described above.

http://git-wip-us.apache.org/repos/asf/helix/blob/39e0d3fb/website/0.6.8/src/site/apt/releasenotes/release-0.6.8.apt
----------------------------------------------------------------------
diff --git a/website/0.6.8/src/site/apt/releasenotes/release-0.6.8.apt 
b/website/0.6.8/src/site/apt/releasenotes/release-0.6.8.apt
new file mode 100644
index 0000000..28571c0
--- /dev/null
+++ b/website/0.6.8/src/site/apt/releasenotes/release-0.6.8.apt
@@ -0,0 +1,124 @@
+ -----
+ Release Notes for Apache Helix 0.6.8
+ -----
+
+~~ Licensed to the Apache Software Foundation (ASF) under one
+~~ or more contributor license agreements.  See the NOTICE file
+~~ distributed with this work for additional information
+~~ regarding copyright ownership.  The ASF licenses this file
+~~ to you under the Apache License, Version 2.0 (the
+~~ "License"); you may not use this file except in compliance
+~~ with the License.  You may obtain a copy of the License at
+~~
+~~   http://www.apache.org/licenses/LICENSE-2.0
+~~
+~~ Unless required by applicable law or agreed to in writing,
+~~ software distributed under the License is distributed on an
+~~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+~~ KIND, either express or implied.  See the License for the
+~~ specific language governing permissions and limitations
+~~ under the License.
+
+~~ NOTE: For help with the syntax of this file, see:
+~~ http://maven.apache.org/guides/mini/guide-apt-format.html
+
+Release Notes for Apache Helix 0.6.8
+
+  The Apache Helix team would like to announce the release of Apache Helix 
0.6.8.
+
+  This is the eleventh release under the Apache umbrella, and the seventh as a 
top-level project.
+
+  Helix is a generic cluster management framework used for the automatic 
management of partitioned, replicated and distributed resources hosted on a 
cluster of nodes. Helix provides the following features:
+
+  * Automatic assignment of resource/partition to nodes
+
+  * Node failure detection and recovery
+
+  * Dynamic addition of Resources
+
+  * Dynamic addition of nodes to the cluster
+
+  * Pluggable distributed state machine to manage the state of a resource via 
state transitions
+
+  * Automatic load balancing and throttling of transitions
+
+[]
+
+* Detailed Changes
+
+** Feature
+
+    * [Helix-656] Support customize batch state transition thread pool.
+
+    * Support cancel tasks with synchronized check task status.
+
+    * Add support of setting/updating Cluster/Resource/Instance configs in 
ConfigAccessor.
+
+    * Add cluster-level and resource-level config option to allow disable 
delayed rebalance of entire cluster or individual resource.
+
+    * New DelayedAutoRebalancer featured with delayed partition movements 
during rebalancing.
+
+    * Add support for flexible hirerachy representation of a cluster topology.
+
+    * Add StrictMatchExternalViewVerifier that verifies whether the 
ExternalViews of given resources (or all resources in the cluster) match 
exactly as its ideal mapping (in idealstate).
+
+    * Add Multi-round CRUSH rebalance strategy.
+
+    * Add option to allow persisting best possible partition assignment in 
IdealState for semi-auto and full-auto modes.
+
+    * Support of client's customized threadpool for state-transition message 
handling.
+
+    * Support delaying jobs schedule with configurable delay time and start 
time
+
+
+** Bug
+
+    * [HELIX-657] Fix unexpected idealstate overwrite when persist assignment 
is on.
+
+    * [HELIX-631] Fix AutoRebalanceStrategy replica not assigned.
+
+    * [HELIX-653] Fix enable/disable partition in instances for resource 
specific.
+
+    * Make map in NotificationContext synchronized.
+
+    * Fix bug in AutoRebalanceStrategy to try to assign orphan replicas to its 
preferred nodes instead of random nodes.
+
+    * Fix a bug in BestPossibleExternalViewVerifier.
+
+    * Fix BestPossibleExternalViewVerifier toString NPE.
+
+    * Do not set MaxPartitionPerNode in IdealState if it is not greater than 0.
+
+
+** Improvement
+
+    * [HELIX-660] Configurable operation timeout for Helix ZKClient.
+
+    * Allow user to enable persisting preference list and best possible state 
map into IdealState in full-auto mode.
+
+    * Expose Callbacks that can let async operation of ZkClient function.
+
+    * Creating a separate threadpool to handle batchMessages.
+
+    * Auto compress ZNode that are greater than 1MB.
+
+    * Ignore instances with no instance configuration.
+
+    * Avoid moving partitions unnecessarily when auto-rebalancing using 
default AutoRebalanceStrategy.
+
+    * Move all options from IdealState to ResourceConfig, add Bulder for 
building ResourceConfig, and a new RebalanceConfig to hold all rebalance 
options for a resource.
+
+    * Persist controller leader change history with timestamp for each leader 
controller.
+
+    * Persist participant's offline timestamp in ParticipantHistory.
+
+    * Persist session change history with timestamp for each participant.
+
+    * Make synchronized for AsyncCallback.startTimer to avoid race condition.
+
+
+[]
+
+Cheers,
+--
+The Apache Helix Team

http://git-wip-us.apache.org/repos/asf/helix/blob/39e0d3fb/website/0.6.8/src/site/markdown/Building.md
----------------------------------------------------------------------
diff --git a/website/0.6.8/src/site/markdown/Building.md 
b/website/0.6.8/src/site/markdown/Building.md
new file mode 100644
index 0000000..eedd878
--- /dev/null
+++ b/website/0.6.8/src/site/markdown/Building.md
@@ -0,0 +1,42 @@
+<!---
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+Build Instructions
+------------------
+
+### From Source
+
+Requirements: JDK 1.6+, Maven 2.0.8+
+
+```
+git clone https://git-wip-us.apache.org/repos/asf/helix.git
+cd helix
+git checkout tags/helix-0.6.8
+mvn install package -DskipTests
+```
+
+### Maven Dependency
+
+```
+<dependency>
+  <groupId>org.apache.helix</groupId>
+  <artifactId>helix-core</artifactId>
+  <version>0.6.8</version>
+</dependency>
+```

http://git-wip-us.apache.org/repos/asf/helix/blob/39e0d3fb/website/0.6.8/src/site/markdown/Features.md
----------------------------------------------------------------------
diff --git a/website/0.6.8/src/site/markdown/Features.md 
b/website/0.6.8/src/site/markdown/Features.md
new file mode 100644
index 0000000..ba9d0e7
--- /dev/null
+++ b/website/0.6.8/src/site/markdown/Features.md
@@ -0,0 +1,313 @@
+<!---
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<head>
+  <title>Features</title>
+</head>
+
+Features
+----------------------------
+
+
+### CONFIGURING IDEALSTATE
+
+
+Read concepts page for definition of Idealstate.
+
+The placement of partitions in a DDS is very critical for reliability and 
scalability of the system. 
+For example, when a node fails, it is important that the partitions hosted on 
that node are reallocated evenly among the remaining nodes. Consistent hashing 
is one such algorithm that can guarantee this.
+Helix by default comes with a variant of consistent hashing based of the RUSH 
algorithm. 
+
+This means given a number of partitions, replicas and number of nodes Helix 
does the automatic assignment of partition to nodes such that
+
+* Each node has the same number of partitions and replicas of the same 
partition do not stay on the same node.
+* When a node fails, the partitions will be equally distributed among the 
remaining nodes
+* When new nodes are added, the number of partitions moved will be minimized 
along with satisfying the above two criteria.
+
+
+Helix provides multiple ways to control the placement and state of a replica. 
+
+```
+
+            |AUTO REBALANCE|   AUTO     |   CUSTOM  |       
+            -----------------------------------------
+   LOCATION | HELIX        |  APP       |  APP      |
+            -----------------------------------------
+      STATE | HELIX        |  HELIX     |  APP      |
+            -----------------------------------------
+```
+
+#### HELIX EXECUTION MODE 
+
+
+Idealstate is defined as the state of the DDS when all nodes are up and 
running and healthy. 
+Helix uses this as the target state of the system and computes the appropriate 
transitions needed in the system to bring it to a stable state. 
+
+Helix supports 3 different execution modes which allows application to 
explicitly control the placement and state of the replica.
+
+##### AUTO_REBALANCE
+
+When the idealstate mode is set to AUTO_REBALANCE, Helix controls both the 
location of the replica along with the state. This option is useful for 
applications where creation of a replica is not expensive. Example
+
+```
+{
+  "id" : "MyResource",
+  "simpleFields" : {
+    "IDEAL_STATE_MODE" : "AUTO_REBALANCE",
+    "NUM_PARTITIONS" : "3",
+    "REPLICAS" : "2",
+    "STATE_MODEL_DEF_REF" : "MasterSlave",
+  }
+  "listFields" : {
+    "MyResource_0" : [],
+    "MyResource_1" : [],
+    "MyResource_2" : []
+  },
+  "mapFields" : {
+  }
+}
+```
+
+If there are 3 nodes in the cluster, then Helix will internally compute the 
ideal state as 
+
+```
+{
+  "id" : "MyResource",
+  "simpleFields" : {
+    "NUM_PARTITIONS" : "3",
+    "REPLICAS" : "2",
+    "STATE_MODEL_DEF_REF" : "MasterSlave",
+  },
+  "mapFields" : {
+    "MyResource_0" : {
+      "N1" : "MASTER",
+      "N2" : "SLAVE",
+    },
+    "MyResource_1" : {
+      "N2" : "MASTER",
+      "N3" : "SLAVE",
+    },
+    "MyResource_2" : {
+      "N3" : "MASTER",
+      "N1" : "SLAVE",
+    }
+  }
+}
+```
+
+Another typical example is evenly distributing a group of tasks among the 
currently alive processes. For example, if there are 60 tasks and 4 nodes, 
Helix assigns 15 tasks to each node. 
+When one node fails Helix redistributes its 15 tasks to the remaining 3 nodes. 
Similarly, if a node is added, Helix re-allocates 3 tasks from each of the 4 
nodes to the 5th node. 
+
+#### AUTO
+
+When the idealstate mode is set to AUTO, Helix only controls STATE of the 
replicas where as the location of the partition is controlled by application. 
Example: The below idealstate indicates thats 'MyResource_0' must be only on 
node1 and node2.  But gives the control of assigning the STATE to Helix.
+
+```
+{
+  "id" : "MyResource",
+  "simpleFields" : {
+    "IDEAL_STATE_MODE" : "AUTO",
+    "NUM_PARTITIONS" : "3",
+    "REPLICAS" : "2",
+    "STATE_MODEL_DEF_REF" : "MasterSlave",
+  }
+  "listFields" : {
+    "MyResource_0" : [node1, node2],
+    "MyResource_1" : [node2, node3],
+    "MyResource_2" : [node3, node1]
+  },
+  "mapFields" : {
+  }
+}
+```
+In this mode when node1 fails, unlike in AUTO-REBALANCE mode the partition is 
not moved from node1 to others nodes in the cluster. Instead, Helix will decide 
to change the state of MyResource_0 in N2 based on the system constraints. For 
example, if a system constraint specified that there should be 1 Master and if 
the Master failed, then node2 will be made the new master. 
+
+#### CUSTOM
+
+Helix offers a third mode called CUSTOM, in which application can completely 
control the placement and state of each replica. Applications will have to 
implement an interface that Helix will invoke when the cluster state changes. 
+Within this callback, the application can recompute the idealstate. Helix will 
then issue appropriate transitions such that Idealstate and Currentstate 
converges.
+
+```
+{
+  "id" : "MyResource",
+  "simpleFields" : {
+      "IDEAL_STATE_MODE" : "CUSTOM",
+    "NUM_PARTITIONS" : "3",
+    "REPLICAS" : "2",
+    "STATE_MODEL_DEF_REF" : "MasterSlave",
+  },
+  "mapFields" : {
+    "MyResource_0" : {
+      "N1" : "MASTER",
+      "N2" : "SLAVE",
+    },
+    "MyResource_1" : {
+      "N2" : "MASTER",
+      "N3" : "SLAVE",
+    },
+    "MyResource_2" : {
+      "N3" : "MASTER",
+      "N1" : "SLAVE",
+    }
+  }
+}
+```
+
+For example, the current state of the system might be 'MyResource_0' -> 
{N1:MASTER,N2:SLAVE} and the application changes the ideal state to 
'MyResource_0' -> {N1:SLAVE,N2:MASTER}. Helix will not blindly issue 
MASTER-->SLAVE to N1 and SLAVE-->MASTER to N2 in parallel since it might result 
in a transient state where both N1 and N2 are masters.
+Helix will first issue MASTER-->SLAVE to N1 and after its completed it will 
issue SLAVE-->MASTER to N2. 
+ 
+
+### State Machine Configuration
+
+Helix comes with 3 default state models that are most commonly used. Its 
possible to have multiple state models in a cluster. 
+Every resource that is added should have a reference to the state model. 
+
+* MASTER-SLAVE: Has 3 states OFFLINE,SLAVE,MASTER. Max masters is 1. Slaves 
will be based on the replication factor. Replication factor can be specified 
while adding the resource
+* ONLINE-OFFLINE: Has 2 states OFFLINE and ONLINE. Very simple state model and 
most applications start off with this state model.
+* LEADER-STANDBY:1 Leader and many stand bys. In general the standby's are 
idle.
+
+Apart from providing the state machine configuration, one can specify the 
constraints of states and transitions.
+
+For example one can say
+Master:1. Max number of replicas in Master state at any time is 1.
+OFFLINE-SLAVE:5 Max number of Offline-Slave transitions that can happen 
concurrently in the system
+
+STATE PRIORITY
+Helix uses greedy approach to satisfy the state constraints. For example if 
the state machine configuration says it needs 1 master and 2 slaves but only 1 
node is active, Helix must promote it to master. This behavior is achieved by 
providing the state priority list as MASTER,SLAVE.
+
+STATE TRANSITION PRIORITY
+Helix tries to fire as many transitions as possible in parallel to reach the 
stable state without violating constraints. By default Helix simply sorts the 
transitions alphabetically and fires as many as it can without violating the 
constraints. 
+One can control this by overriding the priority order.
+ 
+### Config management
+
+Helix allows applications to store application specific properties. The 
configuration can have different scopes.
+
+* Cluster
+* Node specific
+* Resource specific
+* Partition specific
+
+Helix also provides notifications when any configs are changed. This allows 
applications to support dynamic configuration changes.
+
+See HelixManager.getConfigAccessor for more info
+
+### Intra cluster messaging api
+
+This is an interesting feature which is quite useful in practice. Often times, 
nodes in DDS requires a mechanism to interact with each other. One such 
requirement is a process of bootstrapping a replica.
+
+Consider a search system use case where the index replica starts up and it 
does not have an index. One of the commonly used solutions is to get the index 
from a common location or to copy the index from another replica.
+Helix provides a messaging api, that can be used to talk to other nodes in the 
system. The value added that Helix provides here is, message recipient can be 
specified in terms of resource, 
+partition, state and Helix ensures that the message is delivered to all of the 
required recipients. In this particular use case, the instance can specify the 
recipient criteria as all replicas of P1. 
+Since Helix is aware of the global state of the system, it can send the 
message to appropriate nodes. Once the nodes respond Helix provides the 
bootstrapping replica with all the responses.
+
+This is a very generic api and can also be used to schedule various periodic 
tasks in the cluster like data backups etc. 
+System Admins can also perform adhoc tasks like on demand backup or execute a 
system command(like rm -rf ;-)) across all nodes.
+
+```
+      ClusterMessagingService messagingService = manager.getMessagingService();
+      //CONSTRUCT THE MESSAGE
+      Message requestBackupUriRequest = new Message(
+          MessageType.USER_DEFINE_MSG, UUID.randomUUID().toString());
+      requestBackupUriRequest
+          .setMsgSubType(BootstrapProcess.REQUEST_BOOTSTRAP_URL);
+      requestBackupUriRequest.setMsgState(MessageState.NEW);
+      //SET THE RECIPIENT CRITERIA, All nodes that satisfy the criteria will 
receive the message
+      Criteria recipientCriteria = new Criteria();
+      recipientCriteria.setInstanceName("%");
+      recipientCriteria.setRecipientInstanceType(InstanceType.PARTICIPANT);
+      recipientCriteria.setResource("MyDB");
+      recipientCriteria.setPartition("");
+      //Should be processed only the process that is active at the time of 
sending the message. 
+      //This means if the recipient is restarted after message is sent, it 
will not be processed.
+      recipientCriteria.setSessionSpecific(true);
+      // wait for 30 seconds
+      int timeout = 30000;
+      //The handler that will be invoked when any recipient responds to the 
message.
+      BootstrapReplyHandler responseHandler = new BootstrapReplyHandler();
+      //This will return only after all recipients respond or after timeout.
+      int sentMessageCount = messagingService.sendAndWait(recipientCriteria,
+          requestBackupUriRequest, responseHandler, timeout);
+```
+
+See HelixManager.getMessagingService for more info.
+
+
+### Application specific property storage
+
+There are several usecases where applications needs support for distributed 
data structures. Helix uses Zookeeper to store the application data and hence 
provides notifications when the data changes. 
+One value add Helix provides is the ability to specify cache the data and also 
write through cache. This is more efficient than reading from ZK every time.
+
+See HelixManager.getHelixPropertyStore
+
+### Throttling
+
+Since all state changes in the system are triggered through transitions, Helix 
can control the number of transitions that can happen in parallel. Some of the 
transitions may be light weight but some might involve moving data around which 
is quite expensive.
+Helix allows applications to set threshold on transitions. The threshold can 
be set at the multiple scopes.
+
+* MessageType e.g STATE_TRANSITION
+* TransitionType e.g SLAVE-MASTER
+* Resource e.g database
+* Node i.e per node max transitions in parallel.
+
+See HelixManager.getHelixAdmin.addMessageConstraint() 
+
+### Health monitoring and alerting
+
+This in currently in development mode, not yet productionized.
+
+Helix provides ability for each node in the system to report health metrics on 
a periodic basis. 
+Helix supports multiple ways to aggregate these metrics like simple SUM, AVG, 
EXPONENTIAL DECAY, WINDOW. Helix will only persist the aggregated value.
+Applications can define threshold on the aggregate values according to the 
SLA's and when the SLA is violated Helix will fire an alert. 
+Currently Helix only fires an alert but eventually we plan to use this metrics 
to either mark the node dead or load balance the partitions. 
+This feature will be valuable in for distributed systems that support 
multi-tenancy and have huge variation in work load patterns. Another place this 
can be used is to detect skewed partitions and rebalance the cluster.
+
+This feature is not yet stable and do not recommend to be used in production.
+
+
+### Controller deployment modes
+
+Read Architecture wiki for more details on the Role of a controller. In simple 
words, it basically controls the participants in the cluster by issuing 
transitions.
+
+Helix provides multiple options to deploy the controller.
+
+#### STANDALONE
+
+Controller can be started as a separate process to manage a cluster. This is 
the recommended approach. How ever since one controller can be a single point 
of failure, multiple controller processes are required for reliability.
+Even if multiple controllers are running only one will be actively managing 
the cluster at any time and is decided by a leader election process. If the 
leader fails, another leader will resume managing the cluster.
+
+Even though we recommend this method of deployment, it has the drawback of 
having to manage an additional service for each cluster. See Controller As a 
Service option.
+
+#### EMBEDDED
+
+If setting up a separate controller process is not viable, then it is possible 
to embed the controller as a library in each of the participant. 
+
+#### CONTROLLER AS A SERVICE
+
+One of the cool feature we added in helix was use a set of controllers to 
manage a large number of clusters. 
+For example if you have X clusters to be managed, instead of deploying X*3(3 
controllers for fault tolerance) controllers for each cluster, one can deploy 
only 3 controllers. Each controller can manage X/3 clusters. 
+If any controller fails the remaining two will manage X/2 clusters. At 
LinkedIn, we always deploy controllers in this mode. 
+
+
+
+
+
+
+
+ 

Reply via email to