Security News
PyPI’s New Archival Feature Closes a Major Security Gap
PyPI now allows maintainers to archive projects, improving security and helping users make informed decisions about their dependencies.
solr-zkcli
Advanced tools
A node.js wrapper for the Solr's ZooKeeper CLI zkcli.sh to manage SolrCloud configuration parameters
A node.js wrapper for the Solr's ZooKeeper CLI zkcli.sh to manage SolrCloud configuration parameters
The docker command line tool must be installed and accessible in the path.
docker pull solr:7.2.0
npm install solr-zkcli
Then:
var solrZkcli = require('solr-zkcli');
With promise
const solrZkcliOptions = new solrZkcli.SolrZkcliOptions(
/* cmd */ 'upconfig',
/* currentWorkingDirectory */ undefined,
/* zkhost */ '127.0.0.1:2181',
/* confname */ 'my_new_config',
/* confdir */ 'server/solr/configsets/basic_configs/conf',
/* clusterprop*/ undefined,
/* solrhome */ undefined,
/* solrdockerimage */ undefined,
/* machineName */ 'localhost',
/* network */ 'host',
);
solrZkcli.SolrZkCliCommand( options ).then( (data) => {
console.log('data = ', data);
});
//data = { ok: true }
With callback:
solrZkcli.SolrZkCliCommand( options, function (err, data) {
console.log('data = ', data);
});
import { SolrZkcliOptions, SolrZkCliCommand, SolrZkcliResult } from 'solr-zkcli';
const solrZkcliOptions = new SolrZkcliOptions(
/* cmd */ 'upconfig',
/* currentWorkingDirectory */ undefined,
/* zkhost */ '127.0.0.1:2181',
/* confname */ 'my_new_config',
/* confdir */ 'server/solr/configsets/basic_configs/conf',
/* clusterprop*/ undefined
);
SolrZkCliCommand(solrZkcliOptions).then((data: SolrZkcliResult) => {
console.log('data = ', data);
});
var options = {
zkhost: '127.0.0.1:9983/fmlogging',
cmd: 'bootstrap',
solrhome: 'server/solr/'
};
solrZkcli( options ).then(function (data) {
console.log('data = ', data);
});
//data = { ok: true }
var options = {
zkhost: '127.0.0.1:9983',
cmd: 'put /my_zk_file.txt \'some data\''
};
solrZkcli( options ).then(function (data) {
console.log('data = ', data);
});
//data = { ok: true }
var options = {
zkhost: '127.0.0.1:9983',
cmd: 'putfile /my_zk_file.txt /tmp/my_local_file.txt'
};
solrZkcli( options ).then(function (data) {
console.log('data = ', data);
});
//data = { ok: true }
var options = {
zkhost: '127.0.0.1:9983',
cmd: 'makepath /solr'
};
solrZkcli( options ).then(function (data) {
console.log('data = ', data);
});
//data = { ok: true }
var options = {
zkhost: '127.0.0.1:' + config.zkport,
cmd: 'clusterprop',
name: 'urlScheme',
val: 'https'
};
solrZkcli( options ).then(function (data) {
console.log('data = ', data);
});
//data = { ok: true }
var options = {
zkhost: '127.0.0.1:9983',
cmd: 'downconfig',
confname: 'my_new_config',
confdir: '/var/download'
};
solrZkcli( options ).then(function (data) {
console.log('data = ', data);
});
//data = { ok: true }
var options = {
zkhost: '127.0.0.1:' + config.zkport,
cmd: 'get /my_zk_file.txt'
};
solrZkcli( options ).then(function (data) {
console.log('data = ', data);
});
//data = data = { ok: true, returnedData: 'some data' }
var options = {
zkhost: '127.0.0.1:' + config.zkport,
cmd: 'get /my_zk_file.txt /path/to/return.txt'
};
solrZkcli( options ).then(function (data) {
console.log('data = ', data);
});
//data = data = { ok: true }
var options = {
zkhost: '127.0.0.1:' + config.zkport,
cmd: 'list'
};
solrZkcli( options ).then(function (data) {
console.log('data = ', data);
});
//data = {
// ok: true,
// returnedData:
// ['/ (2)',
// 'DATA:',
// ' ',
// ' /my_zk_file.txt (0)',
// ' DATA: ...supressed...',
// ' /zookeeper (1)',
// ' DATA:']
//}
var options = {
zkhost: '127.0.0.1:' + config.zkport,
cmd: 'clear /solr'
};
solrZkcli( options ).then(function (data) {
console.log('data = ', data);
});
//data = { ok: true }
MIT
FAQs
A node.js wrapper for the Solr's ZooKeeper CLI zkcli.sh to manage SolrCloud configuration parameters
The npm package solr-zkcli receives a total of 14 weekly downloads. As such, solr-zkcli popularity was classified as not popular.
We found that solr-zkcli demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
PyPI now allows maintainers to archive projects, improving security and helping users make informed decisions about their dependencies.
Research
Security News
Malicious npm package postcss-optimizer delivers BeaverTail malware, targeting developer systems; similarities to past campaigns suggest a North Korean connection.
Security News
CISA's KEV data is now on GitHub, offering easier access, API integration, commit history tracking, and automated updates for security teams and researchers.