Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files
FALCON-2056 HiveDR doesn't work with multiple users
Author: Sowmya Ramesh <sramesh@hortonworks.com>

Reviewers: "Peeyush B <peeyushb@apache.org>, Balu Vellanki <balu@apache.org>, Ying Zheng <yzheng@hortonworks.com>"

Closes #207 from sowmyaramesh/FALCON-2056

(cherry picked from commit 9018ed3)
Signed-off-by: bvellanki <bvellanki@hortonworks.com>
  • Loading branch information
sowmyaramesh authored and bvellanki committed Jul 1, 2016
1 parent 12863a9 commit 68b729628c5f72c8e878e8ec24dfac97e35716aa
Showing 5 changed files with 12 additions and 7 deletions.
@@ -71,8 +71,8 @@ private void init(final String jobName) throws Exception {
FileUtils.validatePath(jobFS, new Path(DRStatusStore.BASE_DEFAULT_STORE_PATH));

if (!jobFS.exists(dir)) {
if (!jobFS.mkdirs(dir)) {
throw new Exception("Creating directory failed: " + dir);
if (!FileSystem.mkdirs(jobFS, dir, FileUtils.DEFAULT_DIR_PERMISSION)) {
throw new IOException("Creating directory failed: " + dir);
}
}

@@ -63,8 +63,8 @@ private void init(final String jobName) throws Exception {
FileUtils.validatePath(jobFS, new Path(DRStatusStore.BASE_DEFAULT_STORE_PATH));

if (!jobFS.exists(dir)) {
if (!jobFS.mkdirs(dir)) {
throw new Exception("Creating directory failed: " + dir);
if (!FileSystem.mkdirs(jobFS, dir, FileUtils.DEFAULT_DIR_PERMISSION)) {
throw new IOException("Creating directory failed: " + dir);
}
}

@@ -34,8 +34,10 @@
public final class FileUtils {

public static final String DEFAULT_EVENT_STORE_PATH = StringUtils.removeEnd(DRStatusStore
.BASE_DEFAULT_STORE_PATH, File.separator) + File.separator + "Events";
.BASE_DEFAULT_STORE_PATH, File.separator) + File.separator + "Events" + File.separator;
public static final FsPermission FS_PERMISSION_700 = new FsPermission(FsAction.ALL, FsAction.NONE, FsAction.NONE);
public static final FsPermission DEFAULT_DIR_PERMISSION =
new FsPermission(FsAction.ALL, FsAction.ALL, FsAction.NONE);


private FileUtils() {}
@@ -49,7 +49,10 @@ public class HiveDRStatusStore extends DRStatusStore {
private static final Logger LOG = LoggerFactory.getLogger(DRStatusStore.class);
private FileSystem fileSystem;

private static final String DEFAULT_STORE_PATH = BASE_DEFAULT_STORE_PATH + "hiveReplicationStatusStore/";
private static final String DEFAULT_STORE_PATH = StringUtils.removeEnd
(DRStatusStore.BASE_DEFAULT_STORE_PATH, File.separator) + File.separator
+ "hiveReplicationStatusStore" + File.separator;

private static final FsPermission DEFAULT_STATUS_DIR_PERMISSION =
new FsPermission(FsAction.ALL, FsAction.ALL, FsAction.NONE);

@@ -217,7 +217,7 @@ public Properties getAdditionalProperties(final Properties extensionProperties)
String replicationMaxMaps =
extensionProperties.getProperty(HiveMirroringExtensionProperties.MAX_MAPS.getName());
if (StringUtils.isBlank(replicationMaxMaps)) {
additionalProperties.put(HiveMirroringExtensionProperties.MAX_MAPS.getName(), "5");
additionalProperties.put(HiveMirroringExtensionProperties.MAX_MAPS.getName(), "2");
}

String distcpMaxMaps = extensionProperties.getProperty(

0 comments on commit 68b7296

Please sign in to comment.