const service = axios.create({ baseURL: 'http://172.26.0.252:8881', timeout: 5000 })
其实呢这个值应该设置在.env中,设置VUE_APP_BASE_API
1
VUE_APP_BASE_API=http://172.26.0.252:8881
远程调用
解决了跨域之后,开始了实际的接口调用,修改的是登录页面,一测试,报这样的错。
1 2 3 4 5 6 7 8 9 10
login error:Error: ERR_ACTION_ACCESS_UNDEFINED: Are you trying to access this.someMutation() or this.someGetter inside an @Action? That works only in dynamic modules. If not dynamic use this.context.commit("mutationName", payload) and this.context.getters["getterName"] Error: Could not perform action Login at Store.eval (webpack-internal:///./node_modules/vuex-module-decorators/dist/esm/index.js:333:37) at step (webpack-internal:///./node_modules/vuex-module-decorators/dist/esm/index.js:114:23) at Object.eval [asthrow] (webpack-internal:///./node_modules/vuex-module-decorators/dist/esm/index.js:95:53) at rejected (webpack-internal:///./node_modules/vuex-module-decorators/dist/esm/index.js:86:65) Error: error with code: undefined at __webpack_exports__.default (webpack-internal:///./src/utils/request.ts:48:133)
In addition to indexing HBase updates in near-real-time, it’s also possible to run a batch indexing job that will index data already contained within an HBase table. The batch indexing tool operates with the same indexing semantics as the near-real-time indexer, and it is run as a MapReduce job.
In its most basic running mode, the batch indexing can be run as multiple indexers that run over HBase regions and write data directly to Solr, as follows:
The HBase Indexer publishes a number of metrics for each of its indexer processes. These metrics can be useful for getting an idea of how much data is being indexed, keeping track of the health of indexing processes, and troubleshooting problems.
Besides these metrics, you can monitor the replication status using the SEP tools.
除了这些指标,还可以通过SEP tools来监控复制集的状态。
可用指标一览(Overview of available metrics)
HBase to Solr mapping
Each indexer has a metric under hbaseindexer/DefaultResultToSolrMapper/<indexer_name>/HBase Result to Solr Mapping time.
每个索引在hbaseindexer/DefaultResultToSolrMapper/<indexer_name>/HBase Result to Solr Mapping time下用一个指标。
This metric lists information about the amount of time taken (in milliseconds) for converting an HBase update event into a Solr document, as well as a rate (in documents/second) for the general throughput of the process.
这个指标列出了将Hbase转换成Solr文档的总耗费时间(毫秒),以及文档吐吞率(文档数/秒)。
Incoming and applicable Events
Under hbaseindexer/(Row|Column)BasedIndexer/<indexer_name>, there are a pair of metrics about incoming events and applicable events. These metrics list the rate of incoming HBase update events, as well as the rate of incoming HBase events that are considered applicable for indexing.
There are also metrics about “document add/delete errors” and “Solr add/delete errors”. Document-based errors are errors that have occurred where the problem has been determined to be in the Solr document itself. Solr-based errors are errors that have occurred within Solr.
The HBase Indexer includes a number of command line tools for adding, updating, listing, and deleting indexers. All of these tools are executed by supplying a command name to the hbase-indexer tool. For example, to use the list-indexers command, you would enter the following:
1
./bin/hbase-indexer list-indexers
Running any of the commands below with the –help parameter will show a listing of possible command parameters.
add-indexer
The “add-indexer” command is used for configuring a new indexer.
When adding an indexer, you need to supply at least the following:
the name of the indexer
the indexer’s definition (in the form of an xml file)
connection information to the ZooKeeper used by Solr
In order to add a basic indexer named “myindexer” whose definition is saved in a file called myindexer.xml, with ZooKeeper running on a server named myzkhost:2181/solr and a Solr collection named mycollection, you would execute the following:
The update-indexer command is used for updating the definition or the state of an indexer.
This command is most typically used for updating the definition of an indexer – for example, changing the list of fields to be indexed.
The parameters to the update-indexer tool are generally the same as those for the add-indexer tool, but none of them are mandatory except for the name field.
To update the definition of the indexer that was created in the example for add-indexer, you would run the following:
org.elasticsearch.client.transport.NoNodeAvailableException: None of the configured nodes are available: [{#transport#-1}{zYhliWDFSRGpbaB371OV-g}{172.26.0.251}{172.26.0.251:9300}] at org.elasticsearch.client.transport.TransportClientNodesService.ensureNodesAreAvailable(TransportClientNodesService.java:349) at org.elasticsearch.client.transport.TransportClientNodesService.execute(TransportClientNodesService.java:247) at org.elasticsearch.client.transport.TransportProxyClient.execute(TransportProxyClient.java:60) at org.elasticsearch.client.transport.TransportClient.doExecute(TransportClient.java:381) at org.elasticsearch.client.support.AbstractClient.execute(AbstractClient.java:407) at org.elasticsearch.client.support.AbstractClient.execute(AbstractClient.java:396) at org.elasticsearch.action.ActionRequestBuilder.execute(ActionRequestBuilder.java:46) at org.elasticsearch.action.ActionRequestBuilder.get(ActionRequestBuilder.java:53) ...