This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.willvuong.foodie.controller; | |
import com.willvuong.foodie.dao.PlaceRepository; | |
import com.willvuong.foodie.domain.Place; | |
import org.springframework.beans.factory.annotation.Autowired; | |
import org.springframework.data.repository.CrudRepository; | |
import org.springframework.stereotype.Controller; | |
import org.springframework.web.bind.annotation.RequestMapping; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Producer | |
Setup | |
bin/kafka-topics.sh --zookeeper esv4-hcl197.grid.linkedin.com:2181 --create --topic test-rep-one --partitions 6 --replication-factor 1 | |
bin/kafka-topics.sh --zookeeper esv4-hcl197.grid.linkedin.com:2181 --create --topic test --partitions 6 --replication-factor 3 | |
Single thread, no replication | |
bin/kafka-run-class.sh org.apache.kafka.clients.tools.ProducerPerformance test7 50000000 100 -1 acks=1 bootstrap.servers=esv4-hcl198.grid.linkedin.com:9092 buffer.memory=67108864 batch.size=8196 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class AlphabetPartitioner extends Partitioner { | |
def numPartitions = 26 | |
def getPartition(key: Any): Int = key match { | |
case s: String => s(0).toUpper - 'A' | |
} | |
override def equals(other: Any): Boolean = other.isInstanceOf[AlphabetPartitioner] | |
override def hashCode: Int = 0 | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// CREATE COLLECTION | |
solr create_collection -c my_collection -shards 2 -d path-to-my-conf | |
// CHECK COLLECTION SCHEMA | |
curl http://solr-host.dev:8983/solr/my_collection/schema?wt=schema.xml | |
// SCHEMA ITS GOOD | |
// UPDATE SCHEMA |