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
<plugin> | |
<groupId>net.alchim31.maven</groupId> | |
<artifactId>scala-maven-plugin</artifactId> | |
<version>3.4.4</version> | |
<executions> | |
<execution> | |
<id>scala-compile-first</id> | |
<phase>process-resources</phase> | |
<goals> | |
<goal>add-source</goal> |
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
#!/usr/bin/env bash | |
export CLASSPATH_DIR="$(cd `dirname $0`/../lib; pwd)" | |
export CLASS_PATH=`find ${CLASSPATH_DIR} -name '*.jar' | xargs | sed "s/ /${CP_SPLIT}/g"` |
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
<!-- 打包时将依赖放到target/lib目录下 --> | |
<plugin> | |
<groupId>org.apache.maven.plugins</groupId> | |
<artifactId>maven-dependency-plugin</artifactId> | |
<executions> | |
<execution> | |
<id>copy-dependencies</id> | |
<phase>prepare-package</phase> | |
<goals> | |
<goal>copy-dependencies</goal> |
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
<distributionManagement> | |
<repository> | |
<id>mvn-repo</id> | |
<url>file:/mnt/data/oss-mvn/data</url> | |
</repository> | |
</distributionManagement> | |
<repositories> | |
<repository> | |
<id>rebie-maven</id> | |
<url>https://mvn.rebiekong.com/</url> |
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
<plugin> | |
<groupId>org.apache.maven.plugins</groupId> | |
<artifactId>maven-compiler-plugin</artifactId> | |
<configuration> | |
<source>1.8</source> | |
<target>1.8</target> | |
</configuration> | |
</plugin> |
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
<build> | |
<resources> | |
<resource> | |
<directory>src/main/resources</directory> | |
<includes> | |
<include>*.xml</include> | |
<include>*.properties</include> | |
</includes> | |
<filtering>false</filtering> | |
</resource> |
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
val input: Seq[(String, Seq[String])] = List[(String, List[String])]( | |
("A", List[String]("1", "2", "3")), | |
("B", List[String]("2", "3")), | |
("C", List[String]("3", "4")) | |
) | |
val output = input | |
// 转化成 uid => gid | |
.flatten(i => i._2.map(uid => (uid, i._1))) | |
// 转化成 uid => set(gid) | |
.groupBy(i => i._1) |
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 java.io.IOException; | |
import java.nio.charset.Charset; | |
import java.nio.file.Files; | |
import java.nio.file.Path; | |
import java.nio.file.Paths; | |
import java.util.Arrays; | |
public class Test { | |
private final static Integer INDEX_START = 262148; |
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
[program:shadowsocks] | |
directory = / | |
command = sslocal -s 1.1.1.1 -p 65536 -k password -m rc4-md5 -l 65536 | |
autostart = true | |
startsecs = 15 | |
autorestart = true | |
startretries = 3 | |
user = nobody | |
redirect_stderr = true | |
stdout_logfile_maxbytes = 20MB |
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 org.apache.carbondata.format.BlockIndex; | |
import org.apache.carbondata.format.FileFooter3; | |
import org.apache.carbondata.format.IndexHeader; | |
import org.apache.thrift.TException; | |
import org.apache.thrift.protocol.TCompactProtocol; | |
import org.apache.thrift.transport.TIOStreamTransport; | |
import java.io.ByteArrayInputStream; | |
import java.io.DataInputStream; | |
import java.io.FileInputStream; |
OlderNewer