Skip to content

Commit b4e62e3

Browse files
committed
2.1.3 with UTF-8 encoding in tar entry names
1 parent 5db1f72 commit b4e62e3

File tree

3 files changed

+26
-21
lines changed

3 files changed

+26
-21
lines changed

README.rst

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
.. image:: ../../../elasticsearch-knapsack/raw/master/knapsack.png
22

3-
by `DaPino <http://www.iconarchive.com/show/fishing-equipment-icons-by-dapino/backpack-icon.html>`_ `CC Attribution-Noncommercial 3.0 <http://creativecommons.org/licenses/by-nc/3.0/>`_
3+
Image by `DaPino <http://www.iconarchive.com/show/fishing-equipment-icons-by-dapino/backpack-icon.html>`_ `CC Attribution-Noncommercial 3.0 <http://creativecommons.org/licenses/by-nc/3.0/>`_
44

55
Elasticsearch Knapsack Plugin
66
=============================
@@ -12,23 +12,23 @@ It uses tar archive format and gzip compression for input/output.
1212
Installation
1313
------------
1414

15-
Current version of the plugin is **2.1.2** (Oct 11, 2013)
15+
Current version of the plugin is **2.1.3** (Oct 26, 2013)
1616

1717
Prerequisites::
1818

19-
Elasticsearch 0.90.5
19+
Elasticsearch 0.90+
20+
21+
============= ========= ================= ===========================================================
22+
ES version Plugin Release date Command
23+
------------- --------- ----------------- -----------------------------------------------------------
24+
0.90.5 2.1.2 Oct 11, 2013 ./bin/plugin --install knapsack --url http://bit.ly/19D6upG
25+
0.90.5 **2.1.3** Oct 26, 2013 ./bin/plugin --install knapsack --url http://bit.ly/1afkfAY
26+
============= ========= ================= ===========================================================
2027

2128
Bintray:
2229

2330
https://bintray.com/pkg/show/general/jprante/elasticsearch-plugins/elasticsearch-knapsack
2431

25-
`Direct download <http://dl.bintray.com/jprante/elasticsearch-plugins/org/xbib/elasticsearch/plugin/elasticsearch-knapsack/2.1.2/elasticsearch-knapsack-2.1.2.zip>`_
26-
27-
Command::
28-
29-
./bin/plugin -url http://bit.ly/19D6upG -install knapsack
30-
31-
3232
Do not forget to restart the node.
3333

3434
Documentation

pom.xml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
<groupId>org.xbib.elasticsearch.plugin</groupId>
88
<artifactId>elasticsearch-knapsack</artifactId>
9-
<version>2.1.2</version>
9+
<version>2.1.3</version>
1010
<packaging>jar</packaging>
1111

1212
<name>elasticsearch-knapsack</name>
@@ -93,16 +93,21 @@
9393
<plugin>
9494
<groupId>org.apache.maven.plugins</groupId>
9595
<artifactId>maven-compiler-plugin</artifactId>
96-
<version>2.5.1</version>
96+
<version>3.1</version>
9797
<configuration>
9898
<source>1.6</source>
9999
<target>1.6</target>
100+
<encoding>UTF-8</encoding>
101+
<optimize>true</optimize>
102+
<showDeprecation>true</showDeprecation>
103+
<showWarnings>true</showWarnings>
104+
<compilerArgument>-Xlint:all,-serial,-path,-rawtypes,-unchecked</compilerArgument>
100105
</configuration>
101106
</plugin>
102107
<plugin>
103108
<groupId>org.apache.maven.plugins</groupId>
104109
<artifactId>maven-surefire-plugin</artifactId>
105-
<version>2.12.4</version>
110+
<version>2.15</version>
106111
<configuration>
107112
<includes>
108113
<include>**/*Tests.java</include>

src/main/java/org/xbib/io/commons/TarSession.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ public synchronized void open(Mode mode) throws IOException {
5959
File f = new File(s);
6060
if (f.isFile() && f.canRead()) {
6161
this.fin = new FileInputStream(f);
62-
this.in = new TarArchiveInputStream(codecFactory.getCodec("gz").decode(fin));
62+
this.in = new TarArchiveInputStream(codecFactory.getCodec("gz").decode(fin), "UTF-8");
6363
this.isOpen = true;
6464
} else {
6565
throw new FileNotFoundException("check existence or access rights: " + s);
@@ -69,7 +69,7 @@ public synchronized void open(Mode mode) throws IOException {
6969
File f = new File(s);
7070
if (f.isFile() && f.canRead()) {
7171
this.fin = new FileInputStream(f);
72-
this.in = new TarArchiveInputStream(codecFactory.getCodec("bz2").decode(fin));
72+
this.in = new TarArchiveInputStream(codecFactory.getCodec("bz2").decode(fin), "UTF-8");
7373
this.isOpen = true;
7474
} else {
7575
throw new FileNotFoundException("check existence or access rights: " + s);
@@ -79,7 +79,7 @@ public synchronized void open(Mode mode) throws IOException {
7979
File f = new File(s);
8080
if (f.isFile() && f.canRead()) {
8181
this.fin = new FileInputStream(f);
82-
this.in = new TarArchiveInputStream(codecFactory.getCodec("xz").decode(fin));
82+
this.in = new TarArchiveInputStream(codecFactory.getCodec("xz").decode(fin), "UTF-8");
8383
this.isOpen = true;
8484
} else {
8585
throw new FileNotFoundException("check existence or access rights: " + s);
@@ -89,7 +89,7 @@ public synchronized void open(Mode mode) throws IOException {
8989
File f = new File(s);
9090
if (f.isFile() && f.canRead()) {
9191
this.fin = new FileInputStream(f);
92-
this.in = new TarArchiveInputStream(fin);
92+
this.in = new TarArchiveInputStream(fin, "UTF-8");
9393
this.isOpen = true;
9494
} else {
9595
throw new FileNotFoundException("check existence or access rights: " + s);
@@ -99,22 +99,22 @@ public synchronized void open(Mode mode) throws IOException {
9999
case WRITE:
100100
if (scheme.equals("targz")) {
101101
createFileOutputStream(".tar.gz");
102-
this.out = new TarArchiveOutputStream(codecFactory.getCodec("gz").encode(fout));
102+
this.out = new TarArchiveOutputStream(codecFactory.getCodec("gz").encode(fout), "UTF-8");
103103
out.setLongFileMode(TarArchiveOutputStream.LONGFILE_GNU);
104104
this.isOpen = true;
105105
} else if (scheme.equals("tarbz2")) {
106106
createFileOutputStream(".tar.bz2");
107-
this.out = new TarArchiveOutputStream(codecFactory.getCodec("bz2").encode(fout));
107+
this.out = new TarArchiveOutputStream(codecFactory.getCodec("bz2").encode(fout), "UTF-8");
108108
out.setLongFileMode(TarArchiveOutputStream.LONGFILE_GNU);
109109
this.isOpen = true;
110110
} else if (scheme.equals("tarxz")) {
111111
createFileOutputStream(".tar.xz");
112-
this.out = new TarArchiveOutputStream(codecFactory.getCodec("xz").encode(fout));
112+
this.out = new TarArchiveOutputStream(codecFactory.getCodec("xz").encode(fout), "UTF-8");
113113
out.setLongFileMode(TarArchiveOutputStream.LONGFILE_GNU);
114114
this.isOpen = true;
115115
} else {
116116
createFileOutputStream(".tar");
117-
this.out = new TarArchiveOutputStream(fout);
117+
this.out = new TarArchiveOutputStream(fout, "UTF-8");
118118
out.setLongFileMode(TarArchiveOutputStream.LONGFILE_GNU);
119119
this.isOpen = true;
120120
}

0 commit comments

Comments
 (0)