Skip to content
This repository has been archived by the owner on Oct 30, 2023. It is now read-only.

Release 1.2 #23

Open
wants to merge 16 commits into
base: trunk
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion giraph-accumulo/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ under the License.
<parent>
<groupId>org.apache.giraph</groupId>
<artifactId>giraph-parent</artifactId>
<version>1.2.0-SNAPSHOT</version>
<version>1.2.0</version>
</parent>
<artifactId>giraph-accumulo</artifactId>
<packaging>jar</packaging>
Expand Down
2 changes: 1 addition & 1 deletion giraph-block-app-8/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ under the License.
<parent>
<groupId>org.apache.giraph</groupId>
<artifactId>giraph-parent</artifactId>
<version>1.2.0-SNAPSHOT</version>
<version>1.2.0</version>
</parent>
<artifactId>giraph-block-app-8</artifactId>
<packaging>jar</packaging>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.giraph.block_app.library.algo;

import org.apache.giraph.block_app.framework.BlockUtils;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.giraph.block_app.library.pagerank;

import org.apache.giraph.block_app.framework.BlockUtils;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.giraph.writable.kryo;

import java.io.IOException;
Expand Down
2 changes: 1 addition & 1 deletion giraph-block-app/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ under the License.
<parent>
<groupId>org.apache.giraph</groupId>
<artifactId>giraph-parent</artifactId>
<version>1.2.0-SNAPSHOT</version>
<version>1.2.0</version>
</parent>
<artifactId>giraph-block-app</artifactId>
<packaging>jar</packaging>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package org.apache.giraph.block_app.framework;

import org.apache.giraph.block_app.framework.api.BlockWorkerSendApi;
Expand Down
2 changes: 1 addition & 1 deletion giraph-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ under the License.
<parent>
<groupId>org.apache.giraph</groupId>
<artifactId>giraph-parent</artifactId>
<version>1.2.0-SNAPSHOT</version>
<version>1.2.0</version>
</parent>
<artifactId>giraph-core</artifactId>
<packaging>jar</packaging>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ public void configure(GiraphConfiguration conf) {

// Limit number of open requests to 2000
NettyClient.LIMIT_NUMBER_OF_OPEN_REQUESTS.setIfUnset(conf, true);
StaticFlowControl.MAX_NUMBER_OF_OPEN_REQUESTS.setIfUnset(conf, 2000);
StaticFlowControl.MAX_NUMBER_OF_OPEN_REQUESTS.setIfUnset(conf, 100);
// Pooled allocator in netty is faster
GiraphConstants.NETTY_USE_POOLED_ALLOCATOR.setIfUnset(conf, true);
// Turning off auto read is faster
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1003,7 +1003,8 @@ public interface GiraphConstants {
BooleanConfOption KEEP_ZOOKEEPER_DATA =
new BooleanConfOption("giraph.keepZooKeeperData", false,
"Keep the zookeeper output for debugging? Default is to remove it.");

/** Default ZooKeeper snap count. */
int DEFAULT_ZOOKEEPER_SNAP_COUNT = 50000;
/** Default ZooKeeper tick time. */
int DEFAULT_ZOOKEEPER_TICK_TIME = 6000;
/** Default ZooKeeper maximum client connections. */
Expand All @@ -1021,6 +1022,15 @@ public interface GiraphConstants {
new IntConfOption("giraph.zkMaxSessionTimeout", MINUTES.toMillis(15),
"ZooKeeper maximum session timeout");

/** ZooKeeper force sync */
BooleanConfOption ZOOKEEPER_FORCE_SYNC =
new BooleanConfOption("giraph.zKForceSync", false,
"ZooKeeper force sync");

/** ZooKeeper skip ACLs */
BooleanConfOption ZOOKEEPER_SKIP_ACL =
new BooleanConfOption("giraph.ZkSkipAcl", true, "ZooKeeper skip ACLs");

/**
* Whether to use SASL with DIGEST and Hadoop Job Tokens to authenticate
* and authorize Netty BSP Clients to Servers.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ public boolean dataExist(int threadId, DataIndex index) {
/**
* {@link DataOutputWrapper} implementation for {@link InMemoryDataAccessor}
*/
public class InMemoryDataOutputWrapper implements DataOutputWrapper {
public static class InMemoryDataOutputWrapper implements DataOutputWrapper {
/** Output to write data to */
private final BigDataOutput output;
/** Size of output at the moment it was created */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,8 @@ public class InProcessZooKeeperRunner
private QuorumRunner quorumRunner = new QuorumRunner();

@Override
public int start(String zkDir, final ZookeeperConfig config) {
try {
return quorumRunner.start(config);
} catch (IOException e) {
LOG.error("Unable to start zookeeper", e);
}
return -1;
public int start(String zkDir, ZookeeperConfig config) throws IOException {
return quorumRunner.start(config);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -437,19 +437,27 @@ private void generateZooKeeperConfig() {
LOG.info("generateZooKeeperConfigFile: Make directory of " +
zkDirFile.getName() + " = " + mkDirRet);
}
/** Set zookeeper system properties */
System.setProperty("zookeeper.snapCount",
Integer.toString(GiraphConstants.DEFAULT_ZOOKEEPER_SNAP_COUNT));
System.setProperty("zookeeper.forceSync",
GiraphConstants.ZOOKEEPER_FORCE_SYNC.get(conf) ? "yes" : "no");
System.setProperty("zookeeper.skipACL",
GiraphConstants.ZOOKEEPER_SKIP_ACL.get(conf) ? "yes" : "no");

config.setDataDir(zkDir);
config.setDataLogDir(zkDir);
config.setClientPortAddress(new InetSocketAddress(zkBasePort));
config.setMinSessionTimeout(conf.getZooKeeperMinSessionTimeout());
config.setMaxSessionTimeout(conf.getZooKeeperMaxSessionTimeout());

}

/**
* If this task has been selected, online a ZooKeeper server. Otherwise,
* wait until this task knows that the ZooKeeper servers have been onlined.
*/
public void onlineZooKeeperServer() {
public void onlineZooKeeperServer() throws IOException {
if (zkServerTask == taskPartition) {
File zkDirFile = new File(this.zkDir);
try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@

import org.apache.giraph.conf.ImmutableClassesGiraphConfigurable;

import java.io.IOException;

/**
* ZooKeeper wrapper interface.
* Implementation should provide a way to start, stop and cleanup
Expand All @@ -33,7 +35,7 @@ public interface ZooKeeperRunner extends ImmutableClassesGiraphConfigurable {
* @param config zookeeper configuration
* @return port zookeeper runs on
*/
int start(String zkDir, ZookeeperConfig config);
int start(String zkDir, ZookeeperConfig config) throws IOException;

/**
* Stops zookeeper.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,11 @@
/** Test {@link org.apache.giraph.partition.SimpleLongRangePartitionerFactory}. */
public class SimpleRangePartitionFactoryTest {

private void testRange(int numWorkers, int keySpaceSize, int allowedWorkerDiff, boolean emptyWorkers) {
private void testRange(int numWorkers, int numPartitions, int keySpaceSize,
int allowedWorkerDiff, boolean emptyWorkers) {
Configuration conf = new Configuration();
conf.setLong(GiraphConstants.PARTITION_VERTEX_KEY_SPACE_SIZE, keySpaceSize);
GiraphConstants.USER_PARTITION_COUNT.set(conf, numPartitions);
SimpleLongRangePartitionerFactory<Writable, Writable> factory =
new SimpleLongRangePartitionerFactory<Writable, Writable>();
factory.setConf(new ImmutableClassesGiraphConfiguration(conf));
Expand Down Expand Up @@ -106,14 +108,14 @@ private void checkMapping(int[] mapping, int allowedDiff, boolean emptyWorkers)
@Test
public void testLongRangePartitionerFactory() {
// perfect distribution
testRange(10, 100000, 0, false);
testRange(1000, 100000, 0, false);
testRange(10, 1000, 100000, 0, false);
testRange(1000, 50000, 100000, 0, false);

// perfect distribution even when max is hit, and max is not divisible by #workers
testRange(8949, 100023, 0, false);
testRange(1949, 211111, 0, false);
testRange(8949, (50000 / 8949) * 8949, 100023, 0, false);
testRange(1949, (50000 / 1949) * 1949, 211111, 0, false);

// imperfect distribution - because there are more workers than max partitions.
testRange(194942, 211111, 1, true);
testRange(194942, 50000, 211111, 1, true);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ public void testLargeBasicSet() {
}

@Test
@Ignore("this test requires 1G to run")
public void testLargeBasicList() {
int capacity = 123456789;
WArrayList<LongWritable> longSet = LongTypeOps.INSTANCE.createArrayList(capacity);
Expand Down
8 changes: 0 additions & 8 deletions giraph-debugger/.gitignore

This file was deleted.

15 changes: 15 additions & 0 deletions giraph-debugger/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# Giraph Debugger

## Overview
Expand Down
15 changes: 15 additions & 0 deletions giraph-debugger/giraph-debug
Original file line number Diff line number Diff line change
@@ -1,4 +1,19 @@
#!/usr/bin/env bash
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# giraph-debug -- a script for launching Giraph jar with our debugger
#
# To debug your Giraph computation, simply run:
Expand Down
2 changes: 1 addition & 1 deletion giraph-debugger/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ under the License.
<parent>
<groupId>org.apache.giraph</groupId>
<artifactId>giraph-parent</artifactId>
<version>1.2.0-SNAPSHOT</version>
<version>1.2.0</version>
</parent>
<artifactId>giraph-debugger</artifactId>
<packaging>jar</packaging>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/*
* Style for debugger.
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
.valpanel-icons-container {
height: 30px;
width: 100%;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,21 @@
<!DOCTYPE html>
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<html>
<head>
<meta charset="utf-8">
Expand Down
Loading