Pakanga o rua yakozuna, Cassandra vs HBase ranei. Te wheako o te roopu Sberbank

Ehara tenei i te katakata, te ahua nei ko tenei pikitia e whakaatu tika ana i te ngako o enei putunga korero, ka mutu ka marama te take:

Pakanga o rua yakozuna, Cassandra vs HBase ranei. Te wheako o te roopu Sberbank

E ai ki te DB-Engines Ranking, ko nga putunga korero pourangi NoSQL rongonui e rua ko Cassandra (ko CS) me HBase (HB).

Pakanga o rua yakozuna, Cassandra vs HBase ranei. Te wheako o te roopu Sberbank

Na te hiahia o te mutunga, kua ta maatau roopu whakahaere uta raraunga i Sberbank давно me te mahi tata ki te HB. I roto i tenei wa, i tino ako matou i ona kaha me ona ngoikoretanga me te ako ki te tunu. Heoi, ko te aroaro o tetahi momo rereke i roto i te ahua o te CS ka akiaki i a maatau ki te whakamamae i a tatou ano me nga feaa: i tika taatau ki te whiriwhiri? Ano, ko nga hua whakataurite, i mahia e DataStax, i kii ratou he ngawari te patu a CS i te HB me te tata ki te whiu. I tetahi atu taha, ko DataStax he roopu hiahia, a kaua koe e tango i ta raatau kupu. I poauau hoki matou na te iti o nga korero mo nga tikanga whakamatautau, no reira ka whakatau matou ki te rapu i a maatau ake ko wai te kingi o BigData NoSql, a ko nga hua i puta he tino pai.

Heoi, i mua i te neke ki nga hua o nga whakamatautau i mahia, me whakaatu nga waahanga nui o nga whirihoranga taiao. Ko te mea ka taea te whakamahi i te CS i roto i te aratau ka taea te ngaro o nga raraunga. Ko era. Koinei te wa kotahi anake te tūmau (node) te kawenga mo nga raraunga o tetahi kī, a ki te kore e taka, ka ngaro te uara o tenei ki. Mo te maha o nga mahi ehara tenei i te mea tino nui, engari mo te rängai peeke he rereke tenei, kaua ko te ture. I roto i a maatau, he mea nui kia maha nga kape o nga raraunga mo te rokiroki pono.

No reira, ko te aratau mahi CS anake i roto i te aratau tukurua toru i whakaarohia, ara. Ko te hanganga o te waahi waahi i mahia me nga tawhā e whai ake nei:

CREATE KEYSPACE ks WITH REPLICATION = {'class' : 'NetworkTopologyStrategy', 'datacenter1' : 3};

I muri mai, e rua nga huarahi ki te whakarite i te taumata o te rite. Ture whānui:
NW + NR > RF

Ko te tikanga ko te maha o nga whakapumautanga mai i nga pona ka tuhi (NW) me te maha o nga whakau mai i nga pona ka panui ana (NR) me nui ake i te tauwehe tukurua. I roto i ta maatau, RF = 3, ko te tikanga he pai nga whiringa e whai ake nei:
2 + 2 > 3
3 + 1 > 3

I te mea he mea nui ki a maatau te penapena i nga raraunga i runga i te pono ka taea, i whiriwhiria te kaupapa 3+1. I tua atu, ka mahi a HB i runga i te kaupapa rite, i.e. ka pai ake te whakataurite penei.

Me tohu ko te DataStax i mahi rereke i roto i ta raatau ako, i whakaturia e ratou te RF = 1 mo te CS me te HB (mo te whakamutunga ma te whakarereke i nga tautuhinga HDFS). He mea tino nui tenei na te mea he nui te paanga ki te mahi a CS i tenei keehi. Hei tauira, ko te pikitia i raro nei e whakaatu ana i te pikinga o te wa e hiahiatia ana hei uta raraunga ki CS:

Pakanga o rua yakozuna, Cassandra vs HBase ranei. Te wheako o te roopu Sberbank

I konei ka kite tatou i nga mea e whai ake nei: ka nui ake nga miro whakataetae e tuhi raraunga ana, ka roa ake. He mea maori tenei, engari he mea nui kia nui ake te paheketanga o te mahi mo RF=3. Arā, ki te tuhia e tatou nga miro e 4 ki roto i nga ripanga e 5 (20 katoa), ka ngaro te RF=3 mo te 2 nga wa (150 hēkona mo te RF=3 me te 75 mo te RF=1). Engari ki te whakanuia e tatou te uta ma te uta i nga raraunga ki roto i nga tepu e 8 me nga miro e 5 mo ia (40 katoa), ka 3 nga wa te ngaronga o te RF=2,7 (375 hēkona me te 138).

Tena pea koinei te mea ngaro o te whakamatautau kawenga angitu i mahia e DataStax mo CS, na te mea mo te HB i ta maatau tuunga te whakarereke i te take tukurua mai i te 2 ki te 3 kaore he painga. Ko era. ko nga kōpae ehara i te HB pounamu mo ta maatau whirihoranga. Heoi ano, he maha atu nga mahanga kei konei, na te mea me tohu ko ta tatou putanga o HB he paku papaki me te takawiri, he rereke nga taiao, aha atu. He mea tika ano kia mohio ahau kaore pea au i te mohio ki te whakarite tika i te CS me etahi atu huarahi whai hua hei mahi ki a ia, a ko taku tumanako ka kitea e tatou i roto i nga korero. Engari ko nga mea tuatahi.

I mahia nga whakamatautau katoa i runga i te roopu taputapu e 4 nga kaitoro, me te whirihoranga e whai ake nei:

PTM: Xeon E5-2680 v4 @ 2.40GHz 64 miro.
Kopae: 12 nga waahanga SATA HDD
putanga java: 1.8.0_111

Putanga CS: 3.11.5

cassandra.yml tawhānama_tohu: 256
hinted_handoff_enabled: pono
kua tohuhia te kaitao_i_kb: 1024
max_hints_delivery_threads: 2
hints_directory: /data10/cassandra/hints
hints_flush_period_in_ms: 10000
max_hints_file_size_in_mb: 128
batchlog_replay_throttle_in_kb: 1024
kaiwhakamotuhēhē: AllowAllAuthenticator
Kaituhi: AllowAllAuthorizer
role_manager: CassandraRoleManager
roles_validity_in_ms: 2000
whakaaetanga_mana_i_ms: 2000
whaimana_mana_i_ms: 2000
kai wehewehe: org.apache.cassandra.dht.Murmur3Partitioner
raraunga_kōnae_whaiaronga:
- /data1/cassandra/data # ia whaiaronga dataN he kōpae motuhake
- /data2/cassandra/data
- /data3/cassandra/data
- /data4/cassandra/data
- /data5/cassandra/data
- /data6/cassandra/data
- /data7/cassandra/data
- /data8/cassandra/data
commitlog_directory: /data9/cassandra/commitlog
cdc_enabled: teka
disk_failure_policy: mutu
commit_failure_policy: mutu
prepared_statements_cache_size_mb:
thrift_prepared_statements_cache_size_mb:
key_cache_size_in_mb:
key_cache_save_period: 14400
row_cache_size_in_mb: 0
row_cache_save_period: 0
counter_cache_size_in_mb:
wā_whakaora_keteroki_count: 7200
saved_caches_directory: /data10/cassandra/saved_caches
commitlog_sync: wā
commitlog_sync_period_in_ms: 10000
commitlog_segment_size_in_mb: 32
kakano_kaiwhakarato:
- class_name: org.apache.cassandra.locator.SimpleSeedProvider
Tawhitinga:
— kākano: "*,*"
concurrent_reads: 256 # whakamatauria 64 - karekau he rereke i kitea
concurrent_writes: 256 # whakamatauria 64 - karekau he rereke i kitea
concurrent_counter_writes: 256 # whakamatauria 64 - karekau he rereke i kitea
Tuhia_whakaritea_whakaritea: 32
memtable_heap_space_in_mb: 2048 # i whakamatauria 16 GB - he puhoi ake
memtable_allocation_type: heap_buffers
index_summary_capacity_in_mb:
index_summary_resize_interval_in_minutes: 60
trickle_fsync: teka
trickle_fsync_interval_in_kb: 10240
tauranga_putunga: 7000
ssl_storage_port: 7001
whakarongo_address: *
wāhitau_pāho: *
whakarongo_i_broadcast_address: pono
internode_authenticator: org.apache.cassandra.auth.AllowAllInternodeAuthenticator
timata_maori_transport: pono
kawe_maori: 9042
start_rpc: pono
rpc_address: *
rpc_tauranga: 9160
rpc_keepalive: pono
rpc_server_type: tukutahi
thrift_framed_transport_size_in_mb: 15
incremental_backups: teka
snapshot_before_compaction: teka
auto_snapshot: pono
pou_taupū_rahi_i_kb: 64
column_index_cache_size_in_kb: 2
concurrent_compactors: 4
compaction_throughput_mb_per_sec: 1600
sstable_preemptive_open_interval_in_mb: 50
read_request_timeout_in_ms: 100000
awhe_tono_wā_i_ms: 200000
tuhi_tono_wā_i roto i te_ms: 40000
counter_write_request_timeout_in_ms: 100000
cas_contention_timeout_in_ms: 20000
truncate_request_timeout_in_ms: 60000
tono_waa_i_ms: 200000
slow_query_log_timeout_in_ms: 500
cross_node_timeout: teka
endpoint_snitch: GossipingPropertyFileSnitch
dynamic_snitch_update_interval_in_ms: 100
dynamic_snitch_reset_interval_in_ms: 600000
dynamic_snitch_badness_paepae: 0.1
request_scheduler: org.apache.cassandra.scheduler.NoScheduler
tūmau_whakamuna_kōwhiringa:
internode_encryption: kore
kiritaki_whakamuna_kwhiringa:
whakahohea: teka
internode_compression: dc
inter_dc_tcp_nodelay: teka
tracetype_query_ttl: 86400
tracetype_repair_ttl: 604800
enable_user_defined_functions: teka
enable_scripted_user_defined_functions: teka
windows_timer_interval: 1
transparent_data_encryption_options:
whakahohea: teka
tombstone_warn_threshold: 1000
tombstone_failure_paepae: 100000
te rahinga_whakatupato_paepae_i_kb: 200
te rahinga_rahua_paepae_i_kb: 250
unlogged_batch_across_partitions_warn_threshold: 10
compaction_large_partition_warning_threshold_mb: 100
gc_warn_threshold_in_ms: 1000
back_pressure_enabled: teka
enable_materialized_views: pono
enable_sasi_indexes: pono

Tautuhinga GC:

### Tautuhinga CMS-XX:+UseParNewGC
-XX:+WhakamahiaConcMarkSweepGC
-XX:+CMSParallelRemarkEnabled
-XX:SurvivorRatio=8
-XX:MaxTenuringThreshold=1
-XX:CMSIinitiatingOccupancyFraction=75
-XX:+WhakamahiaCMSIinitiatingOccupancyOnly
-XX:CMSWaitDuration=10000
-XX:+CMSParallelInitialMarkEnabled
-XX:+CMSEdenChunksRecord i nga wa katoa
-XX:+CMSClassUnloadingWhakahohe

I tohatohahia te mahara jvm.options 16Gb (i whakamatauria ano e matou te 32 Gb, kaore he rereketanga i kitea).

I hangaia nga ripanga me te whakahau:

CREATE TABLE ks.t1 (id bigint PRIMARY KEY, title text) WITH compression = {'sstable_compression': 'LZ4Compressor', 'chunk_length_kb': 64};

Putanga HB: 1.2.0-cdh5.14.2 (i roto i te akomanga org.apache.hadoop.hbase.regionserver.HRegion i whakakorehia e matou te MetricsRegion i puta ki te GC i te mea kua neke ake te maha o nga rohe i te 1000 i runga i te RoheServer)

Tawhā HBase kore-taunoazookeeper.session.timeout: 120000
hbase.rpc.timeout: 2 meneti(s)
hbase.client.scanner.timeout.period: 2 meneti
hbase.master.handler.count: 10
hbase.regionserver.lease.period, hbase.client.scanner.timeout.period: 2 meneti
hbase.regionserver.handler.count: 160
hbase.regionserver.metahandler.count: 30
hbase.regionserver.logroll.period: 4 haora
hbase.regionserver.maxlogs: 200
hbase.hregion.memstore.flush.size: 1 GiB
hbase.hregion.memstore.block.multiplier: 6
hbase.hstore.compactionThreshold: 5
hbase.hstore.blockingStoreFiles: 200
hbase.hregion.majorcompaction: 1 (ngā) rā
HBase Service Advanced Configuration Snippet (Safety Valve) mo te hbase-site.xml:
hbase.regionserver.wal.codecorg.apache.hadoop.hbase.regionserver.wal.IndexedWALEditCodec
hbase.master.namespace.init.timeout3600000
hbase.regionserver.optionalcacheflushinterval18000000
hbase.regionserver.thread.compaction.large12
hbase.regionserver.wal.enablecompressiontrue
hbase.hstore.compaction.max.size1073741824
hbase.server.compactchecker.interval.multiplier200
Kōwhiringa Whirihoranga Java mo te HBase RegionServer:
-XX:+UseParNewGC -XX:+UseConcMarkSweepGC -XX:CMSIinitiatingOccupancyFraction=70 -XX:+CMSParallelRemarkEnabled -XX:ReservedCodeCacheSize=256m
hbase.snapshot.master.timeoutMillis: 2 meneti
hbase.snapshot.region.timeout: 2 meneti
hbase.snapshot.master.timeout.millis: 2 meneti
HBase REST Server Max Rahi Rangitaki: 100 MiB
HBase REST Tūmau Pūrua Mōrahi Kōnae Rangitaki: 5
HBase Thrift Server Max Rahi Rangitaki: 100 MiB
HBase Thrift Server Morahi Pūrua Kōnae Rangitaki: 5
Rahi Rangitaki Max Matua: 100 MiB
Kaiwhakaako Morahi Pūrua Kōnae Rangitaki: 5
RoheServer Max Rahi Rangitaki: 100 MiB
RoheServer Morahi Pūrua Kōnae Rangitaki: 5
HBase Active Master Detection Matapihi: 4 meneti(s)
dfs.client.hedged.read.threadpool.rahi: 40
dfs.client.hedged.read.threshold.millis: 10 mirinita(ng)
hbase.rest.threads.min: 8
hbase.rest.threads.max: 150
Mōrahi Tukatuka Kōnae Whakaahua: 180000
hbase.thrift.minWorkerThreads: 200
hbase.master.executor.openregion.threads: 30
hbase.master.executor.closeregion.threads: 30
hbase.master.executor.serverops.threads: 60
hbase.regionserver.thread.compaction.small: 6
hbase.ipc.server.read.threadpool.rahi: 20
Nga Miro Whakaneke Rohe: 6
Rahi Puka Java Kiritaki i roto i nga Paita: 1 GiB
HBase REST Tūmau Rōpū Taunoa: 3 GiB
Rōpū Taunoa HBase Thrift Server: 3 GiB
Rahi Puka Java o te Kaiwhakaako HBase i roto i nga Paita: 16 GiB
Rahi Puka Java o HBase RoheServer i Paita: 32 GiB

+Kaitiaki Zoo
maxClientCnxns: 601
moxSessionTimeout: 120000
Waihanga ripanga:
hbase org.apache.hadoop.hbase.util.RegionSplitter ns:t1 UniformSplit -c 64 -f cf
huri 'ns:t1', {NAME => 'cf', DATA_BLOCK_ENCODING => 'FAST_DIFF', COMPRESSION => 'GZ'}

He kaupapa nui kei konei - kaore te whakaahuatanga DataStax e kii ana e hia nga rohe i whakamahia hei hanga i nga ripanga HB, ahakoa he mea nui tenei mo nga pukapuka nui. Na reira, mo nga whakamatautau, i whiriwhiria te rahi = 64, ka taea te penapena ki te 640 GB, i.e. tepu rahi waenga.

I te wa o te whakamatautau, he 22 mano nga tepu me te 67 mano nga rohe o HBase (he mea whakamate tenei mo te putanga 1.2.0 mena kaore mo te papaki kua whakahuahia i runga ake nei).

Inaianei mo te waehere. I te mea kaore i te maarama he aha nga whirihoranga he pai ake mo tetahi putunga raraunga, i mahia nga whakamatautau i roto i nga momo huinga. Ko era. i etahi whakamatautau, e 4 nga tepu i utaina i te wa kotahi (i whakamahia nga pona e 4 mo te hononga). I etahi atu whakamatautau i mahi tahi matou me nga ripanga rereke e 8. I etahi wa, ko te rahi o te puranga 100, i etahi atu 200 (tawhā puranga - tirohia te waehere i raro nei). Ko te rahinga raraunga mo te uara he 10 paita, he 100 paita ranei (Raunga Raunga). Hui katoa, e 5 miriona nga rekoata i tuhia me te panui ki ia ripanga ia wa. I taua wa ano, e 5 nga miro i tuhia/panuihia ki ia ripanga (tau miro - thNum), i whakamahia e ia miro tana ake awhe ki ( tatau = 1 miriona):

if (opType.equals("insert")) {
    for (Long key = count * thNum; key < count * (thNum + 1); key += 0) {
        StringBuilder sb = new StringBuilder("BEGIN BATCH ");
        for (int i = 0; i < batch; i++) {
            String value = RandomStringUtils.random(dataSize, true, true);
            sb.append("INSERT INTO ")
                    .append(tableName)
                    .append("(id, title) ")
                    .append("VALUES (")
                    .append(key)
                    .append(", '")
                    .append(value)
                    .append("');");
            key++;
        }
        sb.append("APPLY BATCH;");
        final String query = sb.toString();
        session.execute(query);
    }
} else {
    for (Long key = count * thNum; key < count * (thNum + 1); key += 0) {
        StringBuilder sb = new StringBuilder("SELECT * FROM ").append(tableName).append(" WHERE id IN (");
        for (int i = 0; i < batch; i++) {
            sb = sb.append(key);
            if (i+1 < batch)
                sb.append(",");
            key++;
        }
        sb = sb.append(");");
        final String query = sb.toString();
        ResultSet rs = session.execute(query);
    }
}

Na reira, he rite nga mahi i whakaratohia mo HB:

Configuration conf = getConf();
HTable table = new HTable(conf, keyspace + ":" + tableName);
table.setAutoFlush(false, false);
List<Get> lGet = new ArrayList<>();
List<Put> lPut = new ArrayList<>();
byte[] cf = Bytes.toBytes("cf");
byte[] qf = Bytes.toBytes("value");
if (opType.equals("insert")) {
    for (Long key = count * thNum; key < count * (thNum + 1); key += 0) {
        lPut.clear();
        for (int i = 0; i < batch; i++) {
            Put p = new Put(makeHbaseRowKey(key));
            String value = RandomStringUtils.random(dataSize, true, true);
            p.addColumn(cf, qf, value.getBytes());
            lPut.add(p);
            key++;
        }
        table.put(lPut);
        table.flushCommits();
    }
} else {
    for (Long key = count * thNum; key < count * (thNum + 1); key += 0) {
        lGet.clear();
        for (int i = 0; i < batch; i++) {
            Get g = new Get(makeHbaseRowKey(key));
            lGet.add(g);
            key++;
        }
        Result[] rs = table.get(lGet);
    }
}

I te mea i roto i te HB me tiaki te kaihoko i te tohatoha orite o nga raraunga, ko te ahua o te mahi tote matua penei:

public static byte[] makeHbaseRowKey(long key) {
    byte[] nonSaltedRowKey = Bytes.toBytes(key);
    CRC32 crc32 = new CRC32();
    crc32.update(nonSaltedRowKey);
    long crc32Value = crc32.getValue();
    byte[] salt = Arrays.copyOfRange(Bytes.toBytes(crc32Value), 5, 7);
    return ArrayUtils.addAll(salt, nonSaltedRowKey);
}

Inaianei ko te waahanga tino pai - nga hua:

Pakanga o rua yakozuna, Cassandra vs HBase ranei. Te wheako o te roopu Sberbank

He rite ano ki te ahua kauwhata:

Pakanga o rua yakozuna, Cassandra vs HBase ranei. Te wheako o te roopu Sberbank

Ko te painga o te HB he tino miharo kei te whakapaehia he ahua o te pounamu kei roto i te huinga CS. Heoi, ko te rapu me te rapu i nga tawhā tino kitea (penei i te concurrent_writes me te memtable_heap_space_in_mb) kaore i tere. I te wa ano, he ma nga rakau me te kore e oati i tetahi mea.

I tohatohahia nga raraunga puta noa i nga pona, he rite tonu nga tatauranga mai i nga pona katoa.

Koinei te ahua o nga tatauranga ripanga mai i tetahi o nga ponaMokowāmatua: ks
Tatau Panui: 9383707
Panui Roto: 0.04287025042448576 ms
Tatau Tuhia: 15462012
Tuhia Roto: 0.1350068438699957 ms
Nga Rere e Tarewa ana: 0
Ripanga: t1
Tatau SST: 16
Mokowā whakamahia (ora): 148.59 MiB
Mokowā i whakamahia (tapeke): 148.59 MiB
Mokowā e whakamahia ana e nga whakaahua (tapeke): 0 paita
Pumahara kua whakamahia (tapeke): 5.17 MiB
Tauwehenga Kōpeketanga SST: 0.5720989576459437
Te maha o nga wehewehenga (whakatau): 3970323
Tatau pūtau mema: 0
Rahi raraunga Memtable: 0 paita
Whakamahia te pumahara putunga: 0 paita
Tatau Whakawhiti Whakawhiti: 5
Tatau panui rohe: 2346045
Roopu panui paetata: NaN ms
Tatau tuhi rohe: 3865503
Tuhituhi paetata: NaN ms
E tarewa ana te rere: 0
Ōrau kua whakatikahia: 0.0
Tātari Puma nga hua teka: 25
Puawai tātari teka ōwehenga: 0.00000
Mokowā tātari pua i whakamahia: 4.57 MiB
Puma te tātari i te putunga puhara i whakamahia: 4.57 MiB
Whakarāpopototanga taupū mai i te pūmahara i whakamahia: 590.02 KiB
Raraunga meta kōpeke atu i te pūmahara kua whakamahia: 19.45 KiB
Paita iti rawa te wehewehenga kiato: 36
Paita morahi wehewehenga kiato: 42
Paita toharite wehewehenga kiato: 42
Toharite pūtau ora mo ia poro (e rima meneti whakamutunga): NaN
Morahi pūtau ora mo ia poro (e rima meneti whakamutunga): 0
Tonga urupa toharite mo ia poro (e rima meneti whakamutunga): NaN
Ko nga urupa teitei mo ia poro (e rima meneti whakamutunga): 0
Whakahekenga Whakataka: 0 paita

Ko te ngana ki te whakaiti i te rahi o te puranga (tae noa ki te tuku takitahi) kaore he painga, ka kino noa atu. Ka taea pea koinei te tino mahi mo te CS, na te mea ko nga hua ka puta mo te CS he rite ki nga mea i whiwhi mo DataStax - tata ki nga rau mano o nga mahi mo ia hekona. I tua atu, ki te titiro tatou ki te whakamahi rauemi, ka kite tatou he maha atu nga PTM me nga kopae e whakamahia ana e CS:

Pakanga o rua yakozuna, Cassandra vs HBase ranei. Te wheako o te roopu Sberbank
Ko te ahua e whakaatu ana i te whakamahinga i te wa e whakahaere ana nga whakamatautau katoa i te rarangi mo nga papaa raraunga e rua.

Mo te painga panui kaha a HB. I konei ka kite koe mo nga papaaarangi e rua, he iti rawa te whakamahi kōpae i te wa e panui ana (ko nga whakamatautau panui te waahanga whakamutunga o te huringa whakamatautau mo ia putunga, hei tauira mo te CS mai i te 15:20 ki te 15:40). I roto i te take o HB, he maamaa te take - ko te nuinga o nga raraunga e iri ana i roto i te mahara, i roto i te memstore, ko etahi kei te keteroki i roto i te blockcache. Mo te CS, kaore i te tino marama me pehea te mahi, engari kare ano hoki e kitea te recycling kōpae, engari i runga i te take, i ngana ki te whakahohe i te keteroki row_cache_size_in_mb = 2048 me te tautuhi keteroki = {'key': 'ALL', 'rows_per_partition': ' 2000000'}, engari he iti ake te kino.

He mea pai ano kia whakahuahia ano tetahi take nui mo te maha o nga rohe i roto i te HB. I roto i to maatau, i tohua te uara ko te 64. Mena ka whakaitihia e koe ka whakataurite ki te, hei tauira, 4, ka panui, ka heke te tere ma te 2 nga wa. Ko te take ka tere ake te whakakii o te memstore, he maha nga wa ka horoia nga konae, ka panui ka nui ake nga konae me mahi, he mahi uaua mo te HB. I roto i nga ahuatanga pono, ka taea tenei ma te whakaaro ma te rautaki presplitting me te whakakotahitanga; ina koa, ka whakamahia e matou he taputapu tuhi whaiaro e kohi paru ana me te kopiri i nga HFiles i nga wa katoa kei muri. Ko te mea pea mo nga whakamatautau DataStax i tohatohahia e ratou 1 anake te rohe mo ia tepu (kare i te tika) a ma tenei e whakamarama te take i iti iho ai te HB i a raatau whakamatautau panui.

Ko nga whakatau tuatahi e whai ake nei ka puta mai i tenei. Ki te whakaaro kaore he hapa nui i mahia i te wa o te whakamatautau, ka rite te ahua o Cassandra ki te colossus me nga waewae uku. Ko te mea tika, i te wa e pauna ana ia i runga i tetahi waewae, pera i te pikitia i te timatanga o te tuhinga, ka whakaatu ia i nga hua pai, engari i roto i te whawhai i raro i nga ahuatanga ano ka ngaro tonu ia. I taua wa ano, ma te whai whakaaro ki te iti o te whakamahi PTM i runga i a maatau taputapu, i ako matou ki te whakato e rua RegionServer HBs ia kaihautu, na reira ka ruarua te mahi. Ko era. Ma te whai whakaaro ki te whakamahinga o nga rauemi, he kino rawa atu te ahuatanga mo te CS.

Ae ra, he tino waihanga enei whakamatautau me te nui o nga raraunga i whakamahia i konei he iti noa. Ka taea pea mena ka huri tatou ki terabytes, ka rereke te ahuatanga, engari mo te HB ka taea e taatau te uta terabytes, mo te CS ka raru tenei. He maha nga wa ka tukuna he OperationTimedOutException ahakoa me enei pukapuka, ahakoa kua piki ake nga tawhā mo te tatari mo te whakautu he maha nga wa ka whakaritea ki nga mea taunoa.

Ko taku tumanako ma te mahi tahi ka kitea e tatou nga pounamu o te CS a mena ka tere ake, ka mutu te panui ka tino taapirihia e au nga korero mo nga hua whakamutunga.

UPD: He mihi ki nga tohutohu a nga hoa, i tere ake taku panui. Ko:
159 ops (644 tepu, 4 awa, puranga 5).
Kua taapiri:
.withLoadBalancingPolicy(TokenAwarePolicy(DCAwareRoundRobinPolicy.builder().build()))
A ka takaro ahau ki te maha o nga miro. Ko te hua e whai ake nei:
4 tepu, 100 miro, puranga = 1 (waahanga ma ia waahanga): 301 ops
4 ripanga, 100 miro, puranga = 10: 447 ops
4 ripanga, 100 miro, puranga = 100: 625 ops

A muri ake ka tono au i etahi atu tohutohu whakarangi, whakahaere i te huringa whakamatautau katoa me te taapiri i nga hua ki te mutunga o te panui.

Source: will.com

Tāpiri i te kōrero