- 实词:名词、动词、形容词、状态词、区别词、数词、量词、代词
- 虚词:副词、介词、连词、助词、拟声词、叹词。
n 名词
nr 人名
| import org.apache.avro.Schema; | |
| import org.apache.avro.generic.GenericData; | |
| import org.apache.avro.generic.GenericDatumWriter; | |
| import org.apache.avro.generic.GenericRecord; | |
| import org.apache.avro.io.Encoder; | |
| import org.apache.avro.io.EncoderFactory; | |
| import org.apache.kafka.clients.producer.KafkaProducer; | |
| import org.apache.kafka.clients.producer.ProducerRecord; | |
| import org.springframework.boot.SpringApplication; | |
| import org.springframework.boot.autoconfigure.EnableAutoConfiguration; |
| public class RedisClient { | |
| private JedisPool pool; | |
| @Inject | |
| public RedisClient(Settings settings) { | |
| try { | |
| pool = new JedisPool(new JedisPoolConfig(), settings.get("redis.host"), settings.getAsInt("redis.port", 6379)); | |
| } catch (SettingsException e) { | |
| // ignore |
| #!/usr/bin/env bash | |
| # This file contains environment variables required to run Spark. Copy it as | |
| # spark-env.sh and edit that to configure Spark for your site. | |
| # | |
| # The following variables can be set in this file: | |
| # - SPARK_LOCAL_IP, to set the IP address Spark binds to on this node | |
| # - MESOS_NATIVE_LIBRARY, to point to your libmesos.so if you use Mesos | |
| # - SPARK_JAVA_OPTS, to set node-specific JVM options for Spark. Note that | |
| # we recommend setting app-wide options in the application's driver program. |
| #!/bin/bash | |
| # herein we backup our indexes! this script should run at like 6pm or something, after logstash | |
| # rotates to a new ES index and theres no new data coming in to the old one. we grab metadatas, | |
| # compress the data files, create a restore script, and push it all up to S3. | |
| TODAY=`date +"%Y.%m.%d"` | |
| INDEXNAME="logstash-$TODAY" # this had better match the index name in ES | |
| INDEXDIR="/usr/local/elasticsearch/data/logstash/nodes/0/indices/" | |
| BACKUPCMD="/usr/local/backupTools/s3cmd --config=/usr/local/backupTools/s3cfg put" | |
| BACKUPDIR="/mnt/es-backups/" | |
| YEARMONTH=`date +"%Y-%m"` |
Kafka acts as a kind of write-ahead log (WAL) that records messages to a persistent store (disk) and allows subscribers to read and apply these changes to their own stores in a system appropriate time-frame.
Terminology:
| #!/usr/bin/env ruby | |
| # Input: WordPress XML export file. | |
| # Outputs: a series of Textile files ready to be included in a Jekyll site, | |
| # and comments.yml which contains all approved comments with metadata which | |
| # can be used for a Disqus import. | |
| require 'rubygems' | |
| require 'hpricot' | |
| require 'clothred' |