On Tue, May 20, 2014 at 3:29 AM, Haster <[email protected]> wrote:
> Hi folks,
>
> When I use Couchbase 2.1 and make /pools/default request as a result I've
> got such data:
>
>
> {"storageTotals":{"ram":{"total":21289803776,"quotaTotal":1073741824,"quotaUsed":478150656,"used":
> 9253646336,"usedByData":97452608},"hdd":{"total":649535152128,"quotaTotal":649535152128,"used":530546125208,"usedByData":174104395,"free":17931529914}},"name":"default","alerts":["Approaching
> full disk warning. Usage of disk \"C:\\\" on node \"172.20.106.81\" is
> around
> 94%."],"alertsSilenceURL":"/controller/resetAlerts?token=18&uuid=63afd0f0ae38e9052058895a09d44a6c","nodes":[{"systemStats":{"cpu_utilization_rate":19.53418482344102,"swap_total":19233505280,"swap_used":7765913600},"interestingStats":{"couch_docs_actual_disk_size":50980557,"couch_docs_data_size":50860600,"couch_views_actual_disk_size":0,"couch_views_data_size":0,"curr_items":500,"curr_items_tot":1000,"mem_used":48700704,"vb_replica_curr_items":500},"uptime":"356353","memoryTotal":17087926272,"memoryFree":10919047168,"mcdMemoryReserved":13037,"mcdMemoryAllocated":13037,"couchApiBase":"
> http://172.20.106.81:8092/","otpNode":"[email protected]
> ","otpCookie":"ghrluvbozdiuqnjv","clusterMembership":"active","status":"healthy","hostname":"
> 172.20.106.81:8091
> ","clusterCompatibility":131072,"version":"2.1.1-764-rel-community","os":"windows","ports":{"proxy":11211,"direct":11210}},{"systemStats":{"cpu_utilization_rate":44.11322645290581,"swap_total":8938917888,"swap_used":7059587072},"interestingStats":{"couch_docs_actual_disk_size":123123838,"couch_docs_data_size":123015736,"couch_views_actual_disk_size":0,"couch_views_data_size":0,"curr_items":500,"curr_items_tot":1000,"mem_used":48751904,"vb_replica_curr_items":500},"uptime":"620098","memoryTotal":4201877504,"memoryFree":1117110272,"mcdMemoryReserved":3205,"mcdMemoryAllocated":3205,"couchApiBase":"
> http://172.20.106.95:8092/","otpNode":"[email protected]
> ","otpCookie":"ghrluvbozdiuqnjv","clusterMembership":"active","status":"healthy","thisNode":true,"hostname":"
> 172.20.106.95:8091
> ","clusterCompatibility":131072,"version":"2.1.1-764-rel-community","os":"windows","ports":{"proxy":11211,"direct":11210}}],"buckets":{"uri":"/pools/default/buckets?v=15804453&uuid=63afd0f0ae38e9052058895a09d44a6c"},"remoteClusters":{"uri":"/pools/default/remoteClusters?uuid=63afd0f0ae38e9052058895a09d44a6c","validateURI":"/pools/default/remoteClusters?just_validate=1"},"controllers":{"addNode":{"uri":"/controller/addNode?uuid=63afd0f0ae38e9052058895a09d44a6c"},"rebalance":{"uri":"/controller/rebalance?uuid=63afd0f0ae38e9052058895a09d44a6c"},"failOver":{"uri":"/controller/failOver?uuid=63afd0f0ae38e9052058895a09d44a6c"},"reAddNode":{"uri":"/controller/reAddNode?uuid=63afd0f0ae38e9052058895a09d44a6c"},"ejectNode":{"uri":"/controller/ejectNode?uuid=63afd0f0ae38e9052058895a09d44a6c"},"setAutoCompaction":{"uri":"/controller/setAutoCompaction?uuid=63afd0f0ae38e9052058895a09d44a6c","validateURI":"/controller/setAutoCompaction?just_validate=1"},"replication":{"createURI":"/controller/createReplication?uuid=63afd0f0ae38e9052058895a09d44a6c","validateURI":"/controller/createReplication?just_validate=1"},"setFastWarmup":{"uri":"/controller/setFastWarmup?uuid=63afd0f0ae38e9052058895a09d44a6c","validateURI":"/controller/setFastWarmup?just_validate=1"}},"
> *balanced*":true,"*failoverWarnings*
> ":[],"rebalanceStatus":"none","rebalanceProgressUri":"/pools/default/rebalanceProgress","stopRebalanceUri":"/controller/stopRebalance?uuid=63afd0f0ae38e9052058895a09d44a6c","nodeStatusesUri":"/nodeStatuses","maxBucketCount":10,"autoCompactionSettings":{"parallelDBAndViewCompaction":false,"databaseFragmentationThreshold":{"percentage":30,"size":"undefined"},"viewFragmentationThreshold":{"percentage":30,"size":"undefined"}},"fastWarmupSettings":{"fastWarmupEnabled":true,"minMemoryThreshold":10,"minItemsThreshold":10},"tasks":{"uri":"/pools/default/tasks?v=133172395"},"counters":{"rebalance_success":3,"rebalance_start":9,"failover_node":2,"rebalance_fail":5},"stopRebalanceIsSafe":true}
>
> As you can see there is tags balanced and failoverWarnings
>
> When I use Couchbase 2.2 and made the same request I've got another data:
>
> {"storageTotals":{"ram":{"total":8370765824,"quotaTotal":2097152000
> ,"quotaUsed":838860800,"used":7843676160
> ,"usedByData":192615120},"hdd":{"total":8214605824,"quotaTotal":8214605824,"used":3943010795,"usedByData":396817506,"free":4271595029}},"serverGroupsUri":"/pools/default/serverGroups?v=86125166","name":"default","alerts":[],"alertsSilenceURL":"/controller/resetAlerts?token=12&uuid=ef10ed62de143e50ece7287a6f0d63e6","nodes":[{"systemStats":{"cpu_utilization_rate":44.04145077720207,"swap_total":2147475456,"swap_used":12288,"mem_total":8370765824,"mem_free":5234716672},"interestingStats":{"cmd_get":0,"couch_docs_actual_disk_size":396817506,"couch_docs_data_size":396274456,"couch_views_actual_disk_size":0,"couch_views_data_size":0,"curr_items":11057,"curr_items_tot":11057,"ep_bg_fetched":0,"get_hits":0,"mem_used":192615120,"ops":0,"vb_replica_curr_items":0},"uptime":"2234462","memoryTotal":8370765824,"memoryFree":5234716672,"mcdMemoryReserved":6386,"mcdMemoryAllocated":6386,"couchApiBase":"
> http://172.20.1.59:8092/
> ","otpCookie":"hrcxcabldbpdbzdl","clusterMembership":"active","status":"healthy","otpNode":"
> [email protected]","thisNode":true,"hostname":"172.20.1.59:8091
> ","clusterCompatibility":131077,"version":"2.5.1-1083-rel-enterprise","os":"x86_64-unknown-linux-gnu","ports":{"httpsMgmt":18091,"httpsCAPI":18092,"sslProxy":11214,"proxy":11211,"direct":11210}}],"buckets":{"uri":"/pools/default/buckets?v=49808852&uuid=ef10ed62de143e50ece7287a6f0d63e6","terseBucketsBase":"/pools/default/b/","terseStreamingBucketsBase":"/pools/default/bs/"},"remoteClusters":{"uri":"/pools/default/remoteClusters?uuid=ef10ed62de143e50ece7287a6f0d63e6","validateURI":"/pools/default/remoteClusters?just_validate=1"},"controllers":{"addNode":{"uri":"/controller/addNode?uuid=ef10ed62de143e50ece7287a6f0d63e6"},"rebalance":{"uri":"/controller/rebalance?uuid=ef10ed62de143e50ece7287a6f0d63e6"},"failOver":{"uri":"/controller/failOver?uuid=ef10ed62de143e50ece7287a6f0d63e6"},"reAddNode":{"uri":"/controller/reAddNode?uuid=ef10ed62de143e50ece7287a6f0d63e6"},"ejectNode":{"uri":"/controller/ejectNode?uuid=ef10ed62de143e50ece7287a6f0d63e6"},"setAutoCompaction":{"uri":"/controller/setAutoCompaction?uuid=ef10ed62de143e50ece7287a6f0d63e6","validateURI":"/controller/setAutoCompaction?just_validate=1"},"replication":{"createURI":"/controller/createReplication?uuid=ef10ed62de143e50ece7287a6f0d63e6","validateURI":"/controller/createReplication?just_validate=1"},"setFastWarmup":{"uri":"/controller/setFastWarmup?uuid=ef10ed62de143e50ece7287a6f0d63e6","validateURI":"/controller/setFastWarmup?just_validate=1"}},"rebalanceStatus":"none","rebalanceProgressUri":"/pools/default/rebalanceProgress","stopRebalanceUri":"/controller/stopRebalance?uuid=ef10ed62de143e50ece7287a6f0d63e6","nodeStatusesUri":"/nodeStatuses","maxBucketCount":30,"autoCompactionSettings":{"parallelDBAndViewCompaction":false,"databaseFragmentationThreshold":{"percentage":30,"size":"undefined"},"viewFragmentationThreshold":{"percentage":30,"size":"undefined"}},"fastWarmupSettings":{"fastWarmupEnabled":true,"minMemoryThreshold":10,"minItemsThreshold":10},"tasks":{"uri":"/pools/default/tasks?v=133172395"},"counters":{"rebalance_success":334,"rebalance_start":445,"failover_node":24,"rebalance_fail":106,"rebalance_stop":5}}
>
> And there is no such tags as balanced and failoverWarnings,
>
> Why were they disappeared? Or maybe were they renamed?
>
They have been hidden.
The story behind this is that unfortunately well back in the day we made
mistake of conflating rest endpoints used by sdk clients and rest endpoints
used for cluster management/monitoring (i.e. by ui or people's scripts).
And the price is that some sdk clients still do /pools/default as part of
bootstrap and every time they do it server has to send them all that "junk"
that's only needed for cluster management/monitoring. Including stats,
balanced flag etc.
So as part of 2.2 I tried to remove all fields that I could from
/pools/default and expose them only if UI is asking. All of those removed
fields were never publicly documented so they were never part of official,
stable, "promised" API.
But notably UI still needs those two fields that you mention above. And
simple way to get them back is to do /pools/default?waitChanges=1 instead
of just /pools/default. Note however that it puts your script into
territory of non-public and "to be changed without notice" APIs, which is
arguably the case already anyways.
--
You received this message because you are subscribed to the Google Groups
"Couchbase" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.