/**
 * Copyright 2016 Netflix, Inc.
 *
 * Licensed 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.
 */
package com.netflix.dynomitemanager.supplier;

import java.util.ArrayList;
import java.util.List;

import com.google.common.base.Supplier;
import com.netflix.astyanax.connectionpool.Host;

public class LocalHostsSupplier implements HostSupplier {
     @Override
     public Supplier<List<Host>> getSupplier(String clusterName) {
       final List<Host> hosts = new ArrayList<Host>();
          hosts.add(new Host("127.0.0.1", 9160).setRack("localdc"));
          return new Supplier<List<Host>>() {
          
          @Override
          public List<Host> get() {
             return hosts;
          }
       };
     }
}

@@ -683,20 +683,90 @@
 va.util.
-List
+Arrays;%0Aimport java.util.List;%0A%0Aimport org.apache.commons.lang.StringUtils
 ;%0A%0Aimpor
@@ -800,16 +800,49 @@
 pplier;%0A
+import com.google.inject.Inject;%0A
 import c
@@ -886,66 +886,252 @@
 st;%0A
-%0Apublic class LocalHostsSupplier implements HostSupplier %7B
+import com.netflix.dynomitemanager.sidecore.IConfiguration;%0A%0Apublic class LocalHostsSupplier implements HostSupplier %7B%0A%09%0A%09private IConfiguration config;%0A%0A%09@Inject%0A%09public LocalHostsSupplier(IConfiguration config) %7B%0A%09%09this.config = config;%0A%09%7D%09%0A%09
 %0A   
@@ -1213,17 +1213,17 @@
 ) %7B%0A    
- 
+%09
   final 
@@ -1268,22 +1268,739 @@
 ();%0A    
+%09
   
+%0A
     
+%09  String bootCluster = config.getBootClusterName();%0A    %09  %0A    %09  if(bootCluster == null)%0A    %09%09  bootCluster = %22%22;%0A    %09  %0A    %09  if (bootCluster.equals(clusterName))%7B%0A              %0A    %09%09  List%3CString%3E cassHostnames = new ArrayList%3CString%3E(Arrays.asList(StringUtils.split(System.getProperty(%22DM_CASSANDRA_CLUSTER_SEEDS%22), %22,%22)));%0A%0A              if(cassHostnames.size() == 0)%0A                  throw new RuntimeException(%22Cassandra Host Names can not be blank. At least one host is needed. Please use system property: DM_CASSANDRA_CLUSTER_SEEDS.%22);%0A%0A              for(String cassHost : cassHostnames) %7B%0A                  hosts.add(new Host(cassHost, 9160));%0A              %7D%0A              %0A    %09  %7Delse%7B%0A    %09%09  
 hosts.ad
@@ -2050,30 +2050,42 @@
 ldc%22));%0A    
+%09
   
+%7D%0A    %09 %0A
     
+ %09
 return new S
@@ -2108,28 +2108,17 @@
 t%3E%3E() %7B%0A
-          %0A 
+%09
         
@@ -2124,25 +2124,25 @@
   @Override%0A
- 
+%09
          pub
@@ -2160,25 +2160,25 @@
 st%3E get() %7B%0A
- 
+%09
             
@@ -2191,17 +2191,17 @@
  hosts;%0A
- 
+%09
         
@@ -2207,17 +2207,21 @@
   %7D%0A
+%09
     
+%7D;%0A%09
    
-%7D;
+ 
 %0A   

add suport for external variable for cass cluster