This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.mapr.kafka.serializer.json; | |
import com.fasterxml.jackson.databind.JsonNode; | |
import com.fasterxml.jackson.databind.ObjectMapper; | |
import org.apache.kafka.clients.producer.KafkaProducer; | |
import org.apache.kafka.clients.producer.ProducerConfig; | |
import org.apache.kafka.clients.producer.ProducerRecord; | |
import org.apache.kafka.connect.json.JsonSerializer; | |
import java.util.Properties; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Confluent.dist] | |
name=Confluent repository (dist) | |
baseurl=https://packages.confluent.io/rpm/5.5/7 | |
gpgcheck=1 | |
gpgkey=https://packages.confluent.io/rpm/5.5/archive.key | |
enabled=1 | |
[Confluent] | |
name=Confluent repository | |
baseurl=https://packages.confluent.io/rpm/5.5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
sudo apt-get update | |
sudo apt-get install python3 python-virtualenv | |
virtualenv --python /usr/bin/python3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
# copy fom wikipedia | |
zh2Hant = { | |
'呆': '獃', | |
"打印机": "印表機", | |
'帮助文件': '說明檔案', | |
"画": "畫", | |
"龙": "竜", | |
"板": "板", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#![feature(asm)] | |
#![feature(naked_functions)] | |
use std::ptr; | |
// MAC 用户不支持很小的stack, 需要至少为624 | |
pub const DEFAULT_STACK_SIZE: usize = 1024 * 1024 * 2; // 2MB的栈,即2M个u8类型的Vec | |
pub const MAX_THREADS: usize = 4; // 最大的 任务 线程数量 | |
pub static mut RUNTIME: usize = 0; // 运行时 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
backdir="/data/tagging_system_backup" | |
suffix=".tgz$" | |
duration=864000 | |
now=`date '+%s'` | |
for f in `ls $backdir|grep $suffix`; | |
do | |
name=${f%.tgz} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import lombok.extern.slf4j.Slf4j; | |
import net.jpountz.lz4.LZ4FrameInputStream; | |
import net.jpountz.lz4.LZ4FrameOutputStream; | |
import org.apache.commons.compress.archivers.tar.TarArchiveEntry; | |
import org.apache.commons.compress.archivers.tar.TarArchiveInputStream; | |
import org.apache.commons.compress.archivers.tar.TarArchiveOutputStream; | |
import java.io.*; | |
import java.nio.file.Path; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"paths":{ | |
"/apis/{group}/{version}/{plural}":{ | |
"parameters":[ | |
{ | |
"uniqueItems":true, | |
"type":"string", | |
"description":"If 'true', then the output is pretty printed.", | |
"name":"pretty", | |
"in":"query" |