diff --git a/s3-extensions/src/main/java/io/druid/storage/s3/AWSSessionCredentialsAdapter.java b/s3-extensions/src/main/java/io/druid/storage/s3/AWSSessionCredentialsAdapter.java index abdc5e5cde8..1fb81fdbbca 100644 --- a/s3-extensions/src/main/java/io/druid/storage/s3/AWSSessionCredentialsAdapter.java +++ b/s3-extensions/src/main/java/io/druid/storage/s3/AWSSessionCredentialsAdapter.java @@ -1,3 +1,22 @@ +/* + * Druid - a distributed column store. + * Copyright (C) 2012, 2013 Metamarkets Group Inc. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + package io.druid.storage.s3; import com.amazonaws.auth.AWSCredentialsProvider; diff --git a/s3-extensions/src/main/java/io/druid/storage/s3/FileSessionCredentialsProvider.java b/s3-extensions/src/main/java/io/druid/storage/s3/FileSessionCredentialsProvider.java index 35a999682ba..9a0030f704b 100644 --- a/s3-extensions/src/main/java/io/druid/storage/s3/FileSessionCredentialsProvider.java +++ b/s3-extensions/src/main/java/io/druid/storage/s3/FileSessionCredentialsProvider.java @@ -1,11 +1,30 @@ +/* + * Druid - a distributed column store. + * Copyright (C) 2012, 2013 Metamarkets Group Inc. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + package io.druid.storage.s3; import com.amazonaws.auth.AWSCredentials; import com.amazonaws.auth.AWSCredentialsProvider; import com.amazonaws.auth.AWSSessionCredentials; +import com.google.common.base.Charsets; import java.io.IOException; -import java.nio.charset.Charset; import java.nio.file.Files; import java.nio.file.Paths; import java.util.List; @@ -45,7 +64,7 @@ public class FileSessionCredentialsProvider implements AWSCredentialsProvider { @Override public void refresh() { try { - List lines = Files.readAllLines(Paths.get(sessionCredentials), Charset.defaultCharset()); + List lines = Files.readAllLines(Paths.get(sessionCredentials), Charsets.UTF_8); Properties props = new Properties(); for (String line : lines) { String[] tokens = line.split("="); diff --git a/s3-extensions/src/test/java/io/druid/storage/s3/TestAWSCredentialsProvider.java b/s3-extensions/src/test/java/io/druid/storage/s3/TestAWSCredentialsProvider.java index e98e178550f..ad3d33995d4 100644 --- a/s3-extensions/src/test/java/io/druid/storage/s3/TestAWSCredentialsProvider.java +++ b/s3-extensions/src/test/java/io/druid/storage/s3/TestAWSCredentialsProvider.java @@ -1,3 +1,22 @@ +/* + * Druid - a distributed column store. + * Copyright (C) 2012, 2013 Metamarkets Group Inc. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + package io.druid.storage.s3; import com.amazonaws.auth.AWSCredentials; diff --git a/s3-extensions/src/test/java/io/druid/storage/s3/TestFileSessionCredentialsProvider.java b/s3-extensions/src/test/java/io/druid/storage/s3/TestFileSessionCredentialsProvider.java index c03dae19f77..8d9743e80c8 100644 --- a/s3-extensions/src/test/java/io/druid/storage/s3/TestFileSessionCredentialsProvider.java +++ b/s3-extensions/src/test/java/io/druid/storage/s3/TestFileSessionCredentialsProvider.java @@ -1,3 +1,22 @@ +/* + * Druid - a distributed column store. + * Copyright (C) 2012, 2013 Metamarkets Group Inc. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + package io.druid.storage.s3; import com.amazonaws.auth.AWSSessionCredentials;