未使用的分配java,Elasticsearch:如何查找未分配的分片并分配它们?

我的低端硬件配置机器上有1个节点,1个分片,1个副本架构 . 我必须将Elasticsearch堆大小保持在总内存的20%,并且我将 1k~1m 文档索引到Elasticsearch关于硬件配置 . 我有 2GB to 16GB 的不同类型的机器,但由于它们在 32bit 架构中,我只能使用 300m 到 1.5GB 最大内存用于堆大小 .

由于某些原因,我不知道为什么,Elasticsearch使用未分配的分片创建一些索引并使群集运行状况变为红色 . 我尝试恢复并分配分片而不创建新节点并将数据传输到其中,因为我不应该 . 我也尝试使用此命令重新路由索引:

curl -XPUT 'localhost:9200/_settings' -d '{

"index.routing.allocation.disable_allocation": false

}'

这是我的节点信息:

{

name: mynode

transport_address: inet[/192.168.1.4:9300]

host: myhost

ip: 127.0.0.1

version: 1.0.0

build: a46900e

http_address: inet[/192.168.1.4:9200]

thrift_address: /192.168.1.4:9500

attributes: {

master: true

}

settings: {

threadpool: {

search: {

type: fixed

size: 600

queue_size: 10000

}

bulk: {

type: fixed

queue_size: 10000

size: 600

}

index: {

type: fixed

queue_size: 10000

size: 600

}

}

node: {

data: true

master: true

name: mynode

}

index: {

mapper: {

dynamic: false

}

routing: {

allocation: {

disable_allocation: false

}

}

store: {

fs: {

lock: none

}

compress: {

stored: true

}

}

number_of_replicas: 0

analysis: {

analyzer: {

string_lowercase: {

filter: lowercase

tokenizer: keyword

}

}

}

cache: {

field: {

type: soft

expire: 24h

max_size: 50000

}

}

number_of_shards: 1

}

bootstrap: {

mlockall: true

}

gateway: {

expected_nodes: 1

}

transport: {

tcp: {

compress: true

}

}

name: mynode

pidfile: /var/run/elasticsearch.pid

path: {

data: /var/lib/es/data

work: /tmp/es

home: /opt/elasticsearch

logs: /var/log/elasticsearch

}

indices: {

memory: {

index_buffer_size: 80%

}

}

cluster: {

routing: {

allocation: {

node_initial_primaries_recoveries: 1

node_concurrent_recoveries: 1

}

}

name: my-elasticsearch

}

max_open_files: false

discovery: {

zen: {

ping: {

multicast: {

enabled: false

}

}

}

}

}

os: {

refresh_interval: 1000

available_processors: 4

cpu: {

vendor: Intel

model: Core(TM) i3-3220 CPU @ 3.30GHz

mhz: 3292

total_cores: 4

total_sockets: 4

cores_per_socket: 16

cache_size_in_bytes: 3072

}

mem: {

total_in_bytes: 4131237888

}

swap: {

total_in_bytes: 4293591040

}

}

process: {

refresh_interval: 1000

id: 24577

max_file_descriptors: 65535

mlockall: true

}

jvm: {

pid: 24577

version: 1.7.0_55

vm_name: Java HotSpot(TM) Server VM

vm_version: 24.55-b03

vm_vendor: Oracle Corporation

start_time: 1405942239741

mem: {

heap_init_in_bytes: 845152256

heap_max_in_bytes: 818348032

non_heap_init_in_bytes: 19136512

non_heap_max_in_bytes: 117440512

direct_max_in_bytes: 818348032

}

gc_collectors: [

ParNew

ConcurrentMarkSweep

]

memory_pools: [

Code Cache

Par Eden Space

Par Survivor Space

CMS Old Gen

CMS Perm Gen

]

}

thread_pool: {

generic: {

type: cached

keep_alive: 30s

}

index: {

type: fixed

min: 600

max: 600

queue_size: 10k

}

get: {

type: fixed

min: 4

max: 4

queue_size: 1k

}

snapshot: {

type: scaling

min: 1

max: 2

keep_alive: 5m

}

merge: {

type: scaling

min: 1

max: 2

keep_alive: 5m

}

suggest: {

type: fixed

min: 4

max: 4

queue_size: 1k

}

bulk: {

type: fixed

min: 600

max: 600

queue_size: 10k

}

optimize: {

type: fixed

min: 1

max: 1

}

warmer: {

type: scaling

min: 1

max: 2

keep_alive: 5m

}

flush: {

type: scaling

min: 1

max: 2

keep_alive: 5m

}

search: {

type: fixed

min: 600

max: 600

queue_size: 10k

}

percolate: {

type: fixed

min: 4

max: 4

queue_size: 1k

}

management: {

type: scaling

min: 1

max: 5

keep_alive: 5m

}

refresh: {

type: scaling

min: 1

max: 2

keep_alive: 5m

}

}

network: {

refresh_interval: 5000

primary_interface: {

address: 192.168.1.2

name: eth0

mac_address: 00:90:0B:2F:A9:08

}

}

transport: {

bound_address: inet[/0:0:0:0:0:0:0:0:9300]

publish_address: inet[/192.168.1.4:9300]

}

http: {

bound_address: inet[/0:0:0:0:0:0:0:0:9200]

publish_address: inet[/192.168.1.4:9200]

max_content_length_in_bytes: 104857600

}

plugins: [

{

name: transport-thrift

version: NA

description: Exports elasticsearch REST APIs over thrift

jvm: true

site: false

}

]

}

最糟糕的情况是找到未分配的分片和删除属性索引,但我想阻止创建未分配的分片 .

任何的想法?

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值