Data processing files mutual conversion

Data processing The main ones organized here are .txt, .json, .csv, .excel, .pkl Data storage and conversion between files 1. txt part 1.1 List[dict] conversion to txt specific code def save_jsonlist_txt(json_data, target_path): “”” Save json list to txt file “”” with open(target_path, “w”, encoding=”utf-8″) as file: for item in json_data: item = str(item).replace(“\ “, “\\ […]

Linux file system fsck disk repair

Linux File System Everything is a file Linux file system is an endogenous software that manages files stored on storage devices. Linux supports several types of file systems for storing applications, data files, configuration files, etc. on the hard drive. File system type: Linux supports a variety of file systems, such as ext4, xfs, btrfs, […]

mybatis handles one-to-many, many-to-one, many-to-many relationships, annotations and xml file writing

Zero, Preface This article is used to study one-to-many, many-to-one, and many-to-many relationships between tables and objects. Two methods of xml file configuration and annotation configuration were studied Super complete~ The entities used for research are students, teachers, courses Note: The relationship between students and teachers should be many-to-many. This article uses many-to-one, that is, […]

java uses geotools to export shp files

The SHP format is a vector data format used to store geographic information system (GIS) data. SHP files consist of a series of ordered files. The shp files we export include .shp, .shx, .dbf, .prj and .fix files. .shp (shape) file: stores vector map data and records the spatial location information of each feature. .shx […]

bclinux aarch64 ceph 14.2.10 file storage Ceph File System, you need to deploy mds: ceph-deploy mds

Createapool [root@ceph-0~]#cephosdpoolcreatecephfs_data64pool’cephfs_data’created[root@ceph-0~]#cephosdpoolcreatecephfs_metadata32pool’cephfs_metadata’created cephfs_metadata64error Officialdescription: Metadatapoolstypicallyholduptoafewgigabytesofdata.Forthisreason,itisgenerallyrecommendedtouseasmallerPGcount.Typically64or128isusedinpracticeforlargeclusters. poollist [root@ceph-0~]#cephosdpoollsvdbenchcephfs_datacephfs_metadata Createfilesystem [root@ceph-0~]#cephfsnewcephfscephfs_metadatacephfs_datanewfswithmetadatapool4anddatapool3[root@ceph-0~]#cephfslsname:cephfs,metadatapool:cephfs_metadata,datapools:[cephfs_data] Filesystemstatus [root@ceph-0~]#cephfsstatuscephfscephfs-0clients======+——+——-+—–+———-+—–+——+|Rank|State|MDS|Activity|dns|inos|+——+——-+—–+———-+—–+——++——+——-+—–+———-+—–+——++—————–+———-+——-+——-+|Pool|type|used|avail|+—————–+———-+——-+——-+|cephfs_metadata|metadata|0|103G||cephfs_data|data|0|103G|+—————–+———-+——-+——-++————-+|StandbyMDS|+————-++————-++———+———+|version|daemons|+———+———++———+———+ Clusterstatus [root@ceph-0~]#ceph-scluster:id:ff72b496-d036-4f1b-b2ad-55358f3c16cbhealth:HEALTH_ERR1filesystemisoffline1filesystemisonlinewithfewerMDSthanmax_mdsmonceph-0islowonavailablespace services:mon:4daemons,quorumceph-3,ceph-1,ceph-0,ceph-2(age4h)mgr:ceph-0(active,since45h),standbys:ceph-1,ceph-3,ceph-2mds:cephfs:0osds:4osds:3up(since45h),3in(since44h) data:pools:3pools,224pgsobjects:4.30kobjects,17GiBusage:53GiBused,247GiB/300GiBavailablepgs:224active+clean Viewmdsstatus(x) [root@ceph-0~]#cephmdsstatcephfs:0 mdshasnoreadynode Thisserviceisnotdeployedbasedonceph-deploy ceph-deploydeploymds ceph-deploymdscreateceph-0ceph-1ceph-2ceph-3 Deploymentsuccesslog [root@ceph-0~]#cd/etc/ceph/ [root@ceph-0ceph]#ceph-deploymdscreateceph-0ceph-1ceph-2ceph-3 [ceph_deploy.conf][DEBUG]foundconfigurationfileat:/root/.cephdeploy.conf [ceph_deploy.cli][INFO]Invoked(2.0.1):/usr/bin/ceph-deploymdscreateceph-0ceph-1ceph-2ceph-3 [ceph_deploy.cli][INFO]ceph-deployoptions: [ceph_deploy.cli][INFO]username:None [ceph_deploy.cli][INFO]verbose:False [ceph_deploy.cli][INFO]overwrite_conf:False [ceph_deploy.cli][INFO]subcommand:create [ceph_deploy.cli][INFO]quiet:False [ceph_deploy.cli][INFO]cd_conf:<ceph_deploy.conf.cephdeploy.Confinstanceat0xffff976c7640> [ceph_deploy.cli][INFO]cluster:ceph [ceph_deploy.cli][INFO]func:<functionmdsat0xffff977620d0> [ceph_deploy.cli][INFO]ceph_conf:None [ceph_deploy.cli][INFO]mds:[(‘ceph-0′,’ceph-0’),(‘ceph-1′,’ceph-1’),(‘ceph-2′,’ceph-2’),(‘ceph-3′,’ceph-3’)] [ceph_deploy.cli][INFO]default_release:False [ceph_deploy.mds][DEBUG]Deployingmds,clustercephhostsceph-0:ceph-0ceph-1:ceph-1ceph-2:ceph-2ceph-3:ceph-3 [ceph-0][DEBUG]connectedtohost:ceph-0 [ceph-0][DEBUG]detectplatforminformationfromremotehost 21.10U3LTS bclinux [ceph-0][DEBUG]detectmachinetype [ceph_deploy.mds][INFO]Distroinfo:bclinux21.10U321.10U3LTS [ceph_deploy.mds][DEBUG]remotehostwillusesystemd [ceph_deploy.mds][DEBUG]deployingmdsbootstraptoceph-0 [ceph-0][DEBUG]writeclusterconfigurationto/etc/ceph/{cluster}.conf [ceph-0][WARNIN]mdskeyringdoesnotexistyet,creatingone [ceph-0][DEBUG]createakeyringfile [ceph-0][DEBUG]createpathifitdoesn’texist [ceph-0][INFO]Runningcommand:ceph–clusterceph–nameclient.bootstrap-mds–keyring/var/lib/ceph/bootstrap-mds/ceph.keyringauthget-or-createmds.ceph-0osdallowrwxmdsallowmonallowprofilemds-o/var/lib/ceph/mds/ceph-ceph-0/keyring [ceph-0][INFO]Runningcommand:systemctlenableceph-mds@ceph-0 [ceph-0][WARNIN]Createdsymlink/etc/systemd/system/ceph-mds.target.wants/[email protected]→/usr/lib/systemd/system/[email protected]. [ceph-0][INFO]Runningcommand:systemctlstartceph-mds@ceph-0 […]

How to run js files under windows, how to enable javascript on the computer

This article will talk about how javascript code runs in the browser and how to run js files under windows. I hope it will be helpful to you. Don’t forget to bookmark this site. JavaScript ECMAScript It is a script programming language standardized by Ecma International (formerly the European Computer Manufacturers Association) and established by […]

ZooKeeper+Kafka+ELK+Filebeat cluster construction to realize large batch log collection and display

The general process: After collecting the logs of the nginx server (web-filebeat) through filebeat, store them in the cache server kafka, and then logstash to the kafka server to retrieve the corresponding logs. After processing, they are written to the elasticsearch server and displayed on kibana. 1. Cluster environment preparation 4c/8G/100G 10.10.200.33 Kafka + ZooKeeper […]

java geotools shpfile to featureCollection

Article directory A brief description maven dependencies Sample code Brief description Convert shpfile to featureCollection maven dependencies <dependency> <groupId>org.geotools</groupId> <artifactId>gt-shapefile</artifactId> <version>27.0</version> </dependency> <dependency> <groupId>org.geotools.jdbc</groupId> <artifactId>gt-jdbc-postgis</artifactId> <version>27.0</version> </dependency> <dependency> <groupId>org.geotools</groupId> <artifactId>gt-referencing</artifactId> <version>27.0</version> </dependency> <dependency> <groupId>org.geotools</groupId> <artifactId>gt-render</artifactId> <version>27.0</version> </dependency> <dependency> <groupId>org.geotools</groupId> <artifactId>gt-coverage</artifactId> <version>27.0</version> </dependency> <dependency> <groupId>it.geosolutions.imageio-ext</groupId> <artifactId>imageio-ext-utilities</artifactId> <version>1.4.4</version> </dependency> <!– https://mvnrepository.com/artifact/com.conversantmedia/disruptor –> <dependency> <groupId>com.conversantmedia</groupId> <artifactId>disruptor</artifactId> <version>1.2.15</version> </dependency> […]

Netty–file programming

3. File programming 3.1 FileChannel FileChannel working mode FileChannel can only work in blocking mode Get FileChannel cannot be opened directly. FileChannel must be obtained through FileInputStream, FileOutputStream or RandomAccessFile. They all have getChannel methods. The channel obtained through FileInputStream can only be read The channel obtained through FileOutputStream can only be written Whether it […]