[jira] [Created] (GIRAPH-1126) Broken Link on Introduction Page for User Docs

2016-12-16 Thread Michael Aro (JIRA)
Michael Aro created GIRAPH-1126:
---

 Summary: Broken Link on Introduction Page for User Docs
 Key: GIRAPH-1126
 URL: https://issues.apache.org/jira/browse/GIRAPH-1126
 Project: Giraph
  Issue Type: Task
  Components: site
 Environment: Chrome Browser v54.0.2840.98 on macOS Sierra v10.12.1
Reporter: Michael Aro
Assignee: Michael Aro
Priority: Trivial


On the Introduction page of the User Docs is a broken link. The "here" link 
before the code snippet on the page has a broken link to a java file on the 
Github site. 






--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (GIRAPH-1126) Broken Link on Introduction Page for User Docs

2016-12-16 Thread Michael Aro (JIRA)

 [ 
https://issues.apache.org/jira/browse/GIRAPH-1126?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Michael Aro updated GIRAPH-1126:

Description: 
On the Introduction page of the User Docs is a broken link. The "here" link 
before the code snippet on the page has a broken link to a java file on the 
Github site. 

URL: http://giraph.apache.org/intro.html




  was:
On the Introduction page of the User Docs is a broken link. The "here" link 
before the code snippet on the page has a broken link to a java file on the 
Github site. 





> Broken Link on Introduction Page for User Docs
> --
>
> Key: GIRAPH-1126
> URL: https://issues.apache.org/jira/browse/GIRAPH-1126
> Project: Giraph
>  Issue Type: Task
>  Components: site
> Environment: Chrome Browser v54.0.2840.98 on macOS Sierra v10.12.1
>Reporter: Michael Aro
>Assignee: Michael Aro
>Priority: Trivial
>  Labels: documentation
>
> On the Introduction page of the User Docs is a broken link. The "here" link 
> before the code snippet on the page has a broken link to a java file on the 
> Github site. 
> URL: http://giraph.apache.org/intro.html



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (GIRAPH-1126) Broken Link on Introduction Page for User Docs

2016-12-16 Thread Michael Aro (JIRA)

[ 
https://issues.apache.org/jira/browse/GIRAPH-1126?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15755607#comment-15755607
 ] 

Michael Aro commented on GIRAPH-1126:
-

Is there a replacement for the java file "SimpleShortestPathsVertex.java" 
missing under the examples folder of the current Giraph version?  This is the 
broken link to Github on the Giraph site - 
https://github.com/apache/giraph/blob/trunk/giraph-examples/src/main/java/org/apache/giraph/examples/SimpleShortestPathsVertex.java

> Broken Link on Introduction Page for User Docs
> --
>
> Key: GIRAPH-1126
> URL: https://issues.apache.org/jira/browse/GIRAPH-1126
> Project: Giraph
>  Issue Type: Task
>  Components: site
> Environment: Chrome Browser v54.0.2840.98 on macOS Sierra v10.12.1
>Reporter: Michael Aro
>Assignee: Michael Aro
>Priority: Trivial
>  Labels: documentation
>
> On the Introduction page of the User Docs is a broken link. The "here" link 
> before the code snippet on the page has a broken link to a java file on the 
> Github site. 
> URL: http://giraph.apache.org/intro.html



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (GIRAPH-1126) Broken Link on Introduction Page for User Docs

2016-12-16 Thread Sergey Edunov (JIRA)

[ 
https://issues.apache.org/jira/browse/GIRAPH-1126?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15755654#comment-15755654
 ] 

Sergey Edunov commented on GIRAPH-1126:
---

I think it is here: 
https://github.com/apache/giraph/blob/trunk/giraph-examples/src/main/java/org/apache/giraph/examples/SimpleShortestPathsComputation.java

But we should actually rewrite it using new API...

> Broken Link on Introduction Page for User Docs
> --
>
> Key: GIRAPH-1126
> URL: https://issues.apache.org/jira/browse/GIRAPH-1126
> Project: Giraph
>  Issue Type: Task
>  Components: site
> Environment: Chrome Browser v54.0.2840.98 on macOS Sierra v10.12.1
>Reporter: Michael Aro
>Assignee: Michael Aro
>Priority: Trivial
>  Labels: documentation
>
> On the Introduction page of the User Docs is a broken link. The "here" link 
> before the code snippet on the page has a broken link to a java file on the 
> Github site. 
> URL: http://giraph.apache.org/intro.html



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (GIRAPH-1126) Broken Link on Introduction Page for User Docs

2016-12-16 Thread Michael Aro (JIRA)

[ 
https://issues.apache.org/jira/browse/GIRAPH-1126?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15755692#comment-15755692
 ] 

Michael Aro commented on GIRAPH-1126:
-

I'm new here, so I'm still reading the docs and source codes. New APIs will be 
good. 

The source code or code snippet on the page is different from the Compute 
method implemented in the java file: 
https://github.com/apache/giraph/blob/trunk/giraph-examples/src/main/java/org/apache/giraph/examples/SimpleShortestPathsComputation.java

The link you provided is from the trunk and the latest release, I believe.

I looked into the release-1.0 of giraph and found this link with the same 
source or code snippet on the current introductory page: 
https://github.com/apache/giraph/blob/release-1.0/giraph-examples/src/main/java/org/apache/giraph/examples/SimpleShortestPathsVertex.java

Which of the java files provided through the links above should I use and link 
to on the intro.html? The source or code snippet will need to be modified or 
not modified depending on the java file.

> Broken Link on Introduction Page for User Docs
> --
>
> Key: GIRAPH-1126
> URL: https://issues.apache.org/jira/browse/GIRAPH-1126
> Project: Giraph
>  Issue Type: Task
>  Components: site
> Environment: Chrome Browser v54.0.2840.98 on macOS Sierra v10.12.1
>Reporter: Michael Aro
>Assignee: Michael Aro
>Priority: Trivial
>  Labels: documentation
>
> On the Introduction page of the User Docs is a broken link. The "here" link 
> before the code snippet on the page has a broken link to a java file on the 
> Github site. 
> URL: http://giraph.apache.org/intro.html



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (GIRAPH-1125) Add memory estimation mechanism to out-of-core

2016-12-16 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/GIRAPH-1125?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15755780#comment-15755780
 ] 

ASF GitHub Bot commented on GIRAPH-1125:


Github user edunov commented on a diff in the pull request:

https://github.com/apache/giraph/pull/12#discussion_r92903138
  
--- Diff: 
giraph-core/src/main/java/org/apache/giraph/ooc/policy/MemoryEstimatorOracle.java
 ---
@@ -0,0 +1,851 @@
+/*
+ * 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.ooc.policy;
+
+import com.sun.management.GarbageCollectionNotificationInfo;
+import org.apache.commons.math.stat.regression.OLSMultipleLinearRegression;
+import org.apache.giraph.comm.NetworkMetrics;
+import org.apache.giraph.conf.FloatConfOption;
+import org.apache.giraph.conf.ImmutableClassesGiraphConfiguration;
+import org.apache.giraph.conf.LongConfOption;
+import org.apache.giraph.edge.AbstractEdgeStore;
+import org.apache.giraph.ooc.OutOfCoreEngine;
+import org.apache.giraph.ooc.command.IOCommand;
+import org.apache.giraph.ooc.command.LoadPartitionIOCommand;
+import org.apache.giraph.ooc.command.WaitIOCommand;
+import org.apache.giraph.worker.EdgeInputSplitsCallable;
+import org.apache.giraph.worker.VertexInputSplitsCallable;
+import org.apache.giraph.worker.WorkerProgress;
+import org.apache.log4j.Logger;
+
+import java.lang.management.ManagementFactory;
+import java.lang.management.MemoryPoolMXBean;
+import java.lang.management.MemoryUsage;
+import java.util.List;
+import java.util.Map;
+import java.util.Vector;
+import java.util.concurrent.atomic.AtomicLong;
+import java.util.concurrent.locks.Lock;
+import java.util.concurrent.locks.ReentrantLock;
+
+import static com.google.common.base.Preconditions.checkState;
+
+/**
+ * Implementation of {@link OutOfCoreOracle} that uses a linear regression 
model
+ * to estimate actual memory usage based on the current state of 
computation.
+ * The model takes into consideration 5 parameters:
+ *
+ * y = c0 + c1*x1 + c2*x2 + c3*x3 + c4*x4 + c5*x5
+ *
+ * y: memory usage
+ * x1: edges loaded
+ * x2: vertices loaded
+ * x3: vertices processed
+ * x4: bytes received due to messages
+ * x5: bytes loaded/stored from/to disk due to OOC.
+ *
+ */
+public class MemoryEstimatorOracle implements OutOfCoreOracle {
+  /** Memory check interval in msec */
+  public static final LongConfOption CHECK_MEMORY_INTERVAL =
+new LongConfOption("giraph.garbageEstimator.checkMemoryInterval", 1000,
+"The interval where memory checker thread wakes up and " +
+"monitors memory footprint (in milliseconds)");
+  /**
+   * If mem-usage is above this threshold and no Full GC has been called,
+   * we call it manually
+   */
+  public static final FloatConfOption MANUAL_GC_MEMORY_PRESSURE =
+new FloatConfOption("giraph.garbageEstimator.manualGCPressure", 0.95f,
+"The threshold above which GC is called manually if Full GC has 
not " +
+"happened in a while");
+  /** Used to detect a high memory pressure situation */
+  public static final FloatConfOption GC_MINIMUM_RECLAIM_FRACTION =
+new FloatConfOption("giraph.garbageEstimator.gcReclaimFraction", 0.05f,
+"Minimum percentage of memory we expect to be reclaimed after a 
Full " +
+"GC. If less than this amount is reclaimed, it is sage to say 
" +
+"we are in a high memory situation and the estimation 
mechanism " +
+"has not recognized it yet!");
+  /** If mem-usage is above this threshold, active threads are set to 0 */
+  public static final FloatConfOption AM_HIGH_THRESHOLD =
+new FloatConfOption("giraph.amHighThreshold", 0.95f,
+"If mem-usage is above this threshold, all active threads " +
+"(compute/input) are paused.");
+  /** If me

[jira] [Commented] (GIRAPH-1125) Add memory estimation mechanism to out-of-core

2016-12-16 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/GIRAPH-1125?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15755794#comment-15755794
 ] 

ASF GitHub Bot commented on GIRAPH-1125:


Github user edunov commented on a diff in the pull request:

https://github.com/apache/giraph/pull/12#discussion_r92903902
  
--- Diff: 
giraph-core/src/main/java/org/apache/giraph/ooc/policy/MemoryEstimatorOracle.java
 ---
@@ -0,0 +1,851 @@
+/*
+ * 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.ooc.policy;
+
+import com.sun.management.GarbageCollectionNotificationInfo;
+import org.apache.commons.math.stat.regression.OLSMultipleLinearRegression;
+import org.apache.giraph.comm.NetworkMetrics;
+import org.apache.giraph.conf.FloatConfOption;
+import org.apache.giraph.conf.ImmutableClassesGiraphConfiguration;
+import org.apache.giraph.conf.LongConfOption;
+import org.apache.giraph.edge.AbstractEdgeStore;
+import org.apache.giraph.ooc.OutOfCoreEngine;
+import org.apache.giraph.ooc.command.IOCommand;
+import org.apache.giraph.ooc.command.LoadPartitionIOCommand;
+import org.apache.giraph.ooc.command.WaitIOCommand;
+import org.apache.giraph.worker.EdgeInputSplitsCallable;
+import org.apache.giraph.worker.VertexInputSplitsCallable;
+import org.apache.giraph.worker.WorkerProgress;
+import org.apache.log4j.Logger;
+
+import java.lang.management.ManagementFactory;
+import java.lang.management.MemoryPoolMXBean;
+import java.lang.management.MemoryUsage;
+import java.util.List;
+import java.util.Map;
+import java.util.Vector;
+import java.util.concurrent.atomic.AtomicLong;
+import java.util.concurrent.locks.Lock;
+import java.util.concurrent.locks.ReentrantLock;
+
+import static com.google.common.base.Preconditions.checkState;
+
+/**
+ * Implementation of {@link OutOfCoreOracle} that uses a linear regression 
model
+ * to estimate actual memory usage based on the current state of 
computation.
+ * The model takes into consideration 5 parameters:
+ *
+ * y = c0 + c1*x1 + c2*x2 + c3*x3 + c4*x4 + c5*x5
+ *
+ * y: memory usage
+ * x1: edges loaded
+ * x2: vertices loaded
+ * x3: vertices processed
+ * x4: bytes received due to messages
+ * x5: bytes loaded/stored from/to disk due to OOC.
+ *
+ */
+public class MemoryEstimatorOracle implements OutOfCoreOracle {
+  /** Memory check interval in msec */
+  public static final LongConfOption CHECK_MEMORY_INTERVAL =
+new LongConfOption("giraph.garbageEstimator.checkMemoryInterval", 1000,
+"The interval where memory checker thread wakes up and " +
+"monitors memory footprint (in milliseconds)");
+  /**
+   * If mem-usage is above this threshold and no Full GC has been called,
+   * we call it manually
+   */
+  public static final FloatConfOption MANUAL_GC_MEMORY_PRESSURE =
+new FloatConfOption("giraph.garbageEstimator.manualGCPressure", 0.95f,
+"The threshold above which GC is called manually if Full GC has 
not " +
+"happened in a while");
+  /** Used to detect a high memory pressure situation */
+  public static final FloatConfOption GC_MINIMUM_RECLAIM_FRACTION =
+new FloatConfOption("giraph.garbageEstimator.gcReclaimFraction", 0.05f,
+"Minimum percentage of memory we expect to be reclaimed after a 
Full " +
+"GC. If less than this amount is reclaimed, it is sage to say 
" +
+"we are in a high memory situation and the estimation 
mechanism " +
+"has not recognized it yet!");
+  /** If mem-usage is above this threshold, active threads are set to 0 */
+  public static final FloatConfOption AM_HIGH_THRESHOLD =
+new FloatConfOption("giraph.amHighThreshold", 0.95f,
+"If mem-usage is above this threshold, all active threads " +
+"(compute/input) are paused.");
+  /** If me

[jira] [Commented] (GIRAPH-1125) Add memory estimation mechanism to out-of-core

2016-12-16 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/GIRAPH-1125?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15755824#comment-15755824
 ] 

ASF GitHub Bot commented on GIRAPH-1125:


Github user edunov commented on a diff in the pull request:

https://github.com/apache/giraph/pull/12#discussion_r92904852
  
--- Diff: 
giraph-core/src/main/java/org/apache/giraph/ooc/policy/MemoryEstimatorOracle.java
 ---
@@ -0,0 +1,851 @@
+/*
+ * 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.ooc.policy;
+
+import com.sun.management.GarbageCollectionNotificationInfo;
+import org.apache.commons.math.stat.regression.OLSMultipleLinearRegression;
+import org.apache.giraph.comm.NetworkMetrics;
+import org.apache.giraph.conf.FloatConfOption;
+import org.apache.giraph.conf.ImmutableClassesGiraphConfiguration;
+import org.apache.giraph.conf.LongConfOption;
+import org.apache.giraph.edge.AbstractEdgeStore;
+import org.apache.giraph.ooc.OutOfCoreEngine;
+import org.apache.giraph.ooc.command.IOCommand;
+import org.apache.giraph.ooc.command.LoadPartitionIOCommand;
+import org.apache.giraph.ooc.command.WaitIOCommand;
+import org.apache.giraph.worker.EdgeInputSplitsCallable;
+import org.apache.giraph.worker.VertexInputSplitsCallable;
+import org.apache.giraph.worker.WorkerProgress;
+import org.apache.log4j.Logger;
+
+import java.lang.management.ManagementFactory;
+import java.lang.management.MemoryPoolMXBean;
+import java.lang.management.MemoryUsage;
+import java.util.List;
+import java.util.Map;
+import java.util.Vector;
+import java.util.concurrent.atomic.AtomicLong;
+import java.util.concurrent.locks.Lock;
+import java.util.concurrent.locks.ReentrantLock;
+
+import static com.google.common.base.Preconditions.checkState;
+
+/**
+ * Implementation of {@link OutOfCoreOracle} that uses a linear regression 
model
+ * to estimate actual memory usage based on the current state of 
computation.
+ * The model takes into consideration 5 parameters:
+ *
+ * y = c0 + c1*x1 + c2*x2 + c3*x3 + c4*x4 + c5*x5
+ *
+ * y: memory usage
+ * x1: edges loaded
+ * x2: vertices loaded
+ * x3: vertices processed
+ * x4: bytes received due to messages
+ * x5: bytes loaded/stored from/to disk due to OOC.
+ *
+ */
+public class MemoryEstimatorOracle implements OutOfCoreOracle {
+  /** Memory check interval in msec */
+  public static final LongConfOption CHECK_MEMORY_INTERVAL =
+new LongConfOption("giraph.garbageEstimator.checkMemoryInterval", 1000,
+"The interval where memory checker thread wakes up and " +
+"monitors memory footprint (in milliseconds)");
+  /**
+   * If mem-usage is above this threshold and no Full GC has been called,
+   * we call it manually
+   */
+  public static final FloatConfOption MANUAL_GC_MEMORY_PRESSURE =
+new FloatConfOption("giraph.garbageEstimator.manualGCPressure", 0.95f,
+"The threshold above which GC is called manually if Full GC has 
not " +
+"happened in a while");
+  /** Used to detect a high memory pressure situation */
+  public static final FloatConfOption GC_MINIMUM_RECLAIM_FRACTION =
+new FloatConfOption("giraph.garbageEstimator.gcReclaimFraction", 0.05f,
+"Minimum percentage of memory we expect to be reclaimed after a 
Full " +
+"GC. If less than this amount is reclaimed, it is sage to say 
" +
+"we are in a high memory situation and the estimation 
mechanism " +
+"has not recognized it yet!");
+  /** If mem-usage is above this threshold, active threads are set to 0 */
+  public static final FloatConfOption AM_HIGH_THRESHOLD =
+new FloatConfOption("giraph.amHighThreshold", 0.95f,
+"If mem-usage is above this threshold, all active threads " +
+"(compute/input) are paused.");
+  /** If me

[jira] [Commented] (GIRAPH-1125) Add memory estimation mechanism to out-of-core

2016-12-16 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/GIRAPH-1125?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15755842#comment-15755842
 ] 

ASF GitHub Bot commented on GIRAPH-1125:


Github user edunov commented on a diff in the pull request:

https://github.com/apache/giraph/pull/12#discussion_r92905726
  
--- Diff: 
giraph-core/src/main/java/org/apache/giraph/ooc/policy/MemoryEstimatorOracle.java
 ---
@@ -0,0 +1,851 @@
+/*
+ * 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.ooc.policy;
+
+import com.sun.management.GarbageCollectionNotificationInfo;
+import org.apache.commons.math.stat.regression.OLSMultipleLinearRegression;
+import org.apache.giraph.comm.NetworkMetrics;
+import org.apache.giraph.conf.FloatConfOption;
+import org.apache.giraph.conf.ImmutableClassesGiraphConfiguration;
+import org.apache.giraph.conf.LongConfOption;
+import org.apache.giraph.edge.AbstractEdgeStore;
+import org.apache.giraph.ooc.OutOfCoreEngine;
+import org.apache.giraph.ooc.command.IOCommand;
+import org.apache.giraph.ooc.command.LoadPartitionIOCommand;
+import org.apache.giraph.ooc.command.WaitIOCommand;
+import org.apache.giraph.worker.EdgeInputSplitsCallable;
+import org.apache.giraph.worker.VertexInputSplitsCallable;
+import org.apache.giraph.worker.WorkerProgress;
+import org.apache.log4j.Logger;
+
+import java.lang.management.ManagementFactory;
+import java.lang.management.MemoryPoolMXBean;
+import java.lang.management.MemoryUsage;
+import java.util.List;
+import java.util.Map;
+import java.util.Vector;
+import java.util.concurrent.atomic.AtomicLong;
+import java.util.concurrent.locks.Lock;
+import java.util.concurrent.locks.ReentrantLock;
+
+import static com.google.common.base.Preconditions.checkState;
+
+/**
+ * Implementation of {@link OutOfCoreOracle} that uses a linear regression 
model
+ * to estimate actual memory usage based on the current state of 
computation.
+ * The model takes into consideration 5 parameters:
+ *
+ * y = c0 + c1*x1 + c2*x2 + c3*x3 + c4*x4 + c5*x5
+ *
+ * y: memory usage
+ * x1: edges loaded
+ * x2: vertices loaded
+ * x3: vertices processed
+ * x4: bytes received due to messages
+ * x5: bytes loaded/stored from/to disk due to OOC.
+ *
+ */
+public class MemoryEstimatorOracle implements OutOfCoreOracle {
+  /** Memory check interval in msec */
+  public static final LongConfOption CHECK_MEMORY_INTERVAL =
+new LongConfOption("giraph.garbageEstimator.checkMemoryInterval", 1000,
+"The interval where memory checker thread wakes up and " +
+"monitors memory footprint (in milliseconds)");
+  /**
+   * If mem-usage is above this threshold and no Full GC has been called,
+   * we call it manually
+   */
+  public static final FloatConfOption MANUAL_GC_MEMORY_PRESSURE =
+new FloatConfOption("giraph.garbageEstimator.manualGCPressure", 0.95f,
+"The threshold above which GC is called manually if Full GC has 
not " +
+"happened in a while");
+  /** Used to detect a high memory pressure situation */
+  public static final FloatConfOption GC_MINIMUM_RECLAIM_FRACTION =
+new FloatConfOption("giraph.garbageEstimator.gcReclaimFraction", 0.05f,
+"Minimum percentage of memory we expect to be reclaimed after a 
Full " +
+"GC. If less than this amount is reclaimed, it is sage to say 
" +
+"we are in a high memory situation and the estimation 
mechanism " +
+"has not recognized it yet!");
+  /** If mem-usage is above this threshold, active threads are set to 0 */
+  public static final FloatConfOption AM_HIGH_THRESHOLD =
+new FloatConfOption("giraph.amHighThreshold", 0.95f,
+"If mem-usage is above this threshold, all active threads " +
+"(compute/input) are paused.");
+  /** If me

[jira] [Commented] (GIRAPH-1125) Add memory estimation mechanism to out-of-core

2016-12-16 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/GIRAPH-1125?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15755874#comment-15755874
 ] 

ASF GitHub Bot commented on GIRAPH-1125:


Github user edunov commented on a diff in the pull request:

https://github.com/apache/giraph/pull/12#discussion_r92906967
  
--- Diff: 
giraph-core/src/main/java/org/apache/giraph/ooc/policy/MemoryEstimatorOracle.java
 ---
@@ -0,0 +1,851 @@
+/*
+ * 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.ooc.policy;
+
+import com.sun.management.GarbageCollectionNotificationInfo;
+import org.apache.commons.math.stat.regression.OLSMultipleLinearRegression;
+import org.apache.giraph.comm.NetworkMetrics;
+import org.apache.giraph.conf.FloatConfOption;
+import org.apache.giraph.conf.ImmutableClassesGiraphConfiguration;
+import org.apache.giraph.conf.LongConfOption;
+import org.apache.giraph.edge.AbstractEdgeStore;
+import org.apache.giraph.ooc.OutOfCoreEngine;
+import org.apache.giraph.ooc.command.IOCommand;
+import org.apache.giraph.ooc.command.LoadPartitionIOCommand;
+import org.apache.giraph.ooc.command.WaitIOCommand;
+import org.apache.giraph.worker.EdgeInputSplitsCallable;
+import org.apache.giraph.worker.VertexInputSplitsCallable;
+import org.apache.giraph.worker.WorkerProgress;
+import org.apache.log4j.Logger;
+
+import java.lang.management.ManagementFactory;
+import java.lang.management.MemoryPoolMXBean;
+import java.lang.management.MemoryUsage;
+import java.util.List;
+import java.util.Map;
+import java.util.Vector;
+import java.util.concurrent.atomic.AtomicLong;
+import java.util.concurrent.locks.Lock;
+import java.util.concurrent.locks.ReentrantLock;
+
+import static com.google.common.base.Preconditions.checkState;
+
+/**
+ * Implementation of {@link OutOfCoreOracle} that uses a linear regression 
model
+ * to estimate actual memory usage based on the current state of 
computation.
+ * The model takes into consideration 5 parameters:
+ *
+ * y = c0 + c1*x1 + c2*x2 + c3*x3 + c4*x4 + c5*x5
+ *
+ * y: memory usage
+ * x1: edges loaded
+ * x2: vertices loaded
+ * x3: vertices processed
+ * x4: bytes received due to messages
+ * x5: bytes loaded/stored from/to disk due to OOC.
+ *
+ */
+public class MemoryEstimatorOracle implements OutOfCoreOracle {
+  /** Memory check interval in msec */
+  public static final LongConfOption CHECK_MEMORY_INTERVAL =
+new LongConfOption("giraph.garbageEstimator.checkMemoryInterval", 1000,
+"The interval where memory checker thread wakes up and " +
+"monitors memory footprint (in milliseconds)");
+  /**
+   * If mem-usage is above this threshold and no Full GC has been called,
+   * we call it manually
+   */
+  public static final FloatConfOption MANUAL_GC_MEMORY_PRESSURE =
+new FloatConfOption("giraph.garbageEstimator.manualGCPressure", 0.95f,
+"The threshold above which GC is called manually if Full GC has 
not " +
+"happened in a while");
+  /** Used to detect a high memory pressure situation */
+  public static final FloatConfOption GC_MINIMUM_RECLAIM_FRACTION =
+new FloatConfOption("giraph.garbageEstimator.gcReclaimFraction", 0.05f,
+"Minimum percentage of memory we expect to be reclaimed after a 
Full " +
+"GC. If less than this amount is reclaimed, it is sage to say 
" +
+"we are in a high memory situation and the estimation 
mechanism " +
+"has not recognized it yet!");
+  /** If mem-usage is above this threshold, active threads are set to 0 */
+  public static final FloatConfOption AM_HIGH_THRESHOLD =
+new FloatConfOption("giraph.amHighThreshold", 0.95f,
+"If mem-usage is above this threshold, all active threads " +
+"(compute/input) are paused.");
+  /** If me

[jira] [Commented] (GIRAPH-1125) Add memory estimation mechanism to out-of-core

2016-12-16 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/GIRAPH-1125?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15755878#comment-15755878
 ] 

ASF GitHub Bot commented on GIRAPH-1125:


Github user edunov commented on a diff in the pull request:

https://github.com/apache/giraph/pull/12#discussion_r92907194
  
--- Diff: 
giraph-core/src/main/java/org/apache/giraph/ooc/policy/MemoryEstimatorOracle.java
 ---
@@ -0,0 +1,851 @@
+/*
+ * 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.ooc.policy;
+
+import com.sun.management.GarbageCollectionNotificationInfo;
+import org.apache.commons.math.stat.regression.OLSMultipleLinearRegression;
+import org.apache.giraph.comm.NetworkMetrics;
+import org.apache.giraph.conf.FloatConfOption;
+import org.apache.giraph.conf.ImmutableClassesGiraphConfiguration;
+import org.apache.giraph.conf.LongConfOption;
+import org.apache.giraph.edge.AbstractEdgeStore;
+import org.apache.giraph.ooc.OutOfCoreEngine;
+import org.apache.giraph.ooc.command.IOCommand;
+import org.apache.giraph.ooc.command.LoadPartitionIOCommand;
+import org.apache.giraph.ooc.command.WaitIOCommand;
+import org.apache.giraph.worker.EdgeInputSplitsCallable;
+import org.apache.giraph.worker.VertexInputSplitsCallable;
+import org.apache.giraph.worker.WorkerProgress;
+import org.apache.log4j.Logger;
+
+import java.lang.management.ManagementFactory;
+import java.lang.management.MemoryPoolMXBean;
+import java.lang.management.MemoryUsage;
+import java.util.List;
+import java.util.Map;
+import java.util.Vector;
+import java.util.concurrent.atomic.AtomicLong;
+import java.util.concurrent.locks.Lock;
+import java.util.concurrent.locks.ReentrantLock;
+
+import static com.google.common.base.Preconditions.checkState;
+
+/**
+ * Implementation of {@link OutOfCoreOracle} that uses a linear regression 
model
+ * to estimate actual memory usage based on the current state of 
computation.
+ * The model takes into consideration 5 parameters:
+ *
+ * y = c0 + c1*x1 + c2*x2 + c3*x3 + c4*x4 + c5*x5
+ *
+ * y: memory usage
+ * x1: edges loaded
+ * x2: vertices loaded
+ * x3: vertices processed
+ * x4: bytes received due to messages
+ * x5: bytes loaded/stored from/to disk due to OOC.
+ *
+ */
+public class MemoryEstimatorOracle implements OutOfCoreOracle {
+  /** Memory check interval in msec */
+  public static final LongConfOption CHECK_MEMORY_INTERVAL =
+new LongConfOption("giraph.garbageEstimator.checkMemoryInterval", 1000,
+"The interval where memory checker thread wakes up and " +
+"monitors memory footprint (in milliseconds)");
+  /**
+   * If mem-usage is above this threshold and no Full GC has been called,
+   * we call it manually
+   */
+  public static final FloatConfOption MANUAL_GC_MEMORY_PRESSURE =
+new FloatConfOption("giraph.garbageEstimator.manualGCPressure", 0.95f,
+"The threshold above which GC is called manually if Full GC has 
not " +
+"happened in a while");
+  /** Used to detect a high memory pressure situation */
+  public static final FloatConfOption GC_MINIMUM_RECLAIM_FRACTION =
+new FloatConfOption("giraph.garbageEstimator.gcReclaimFraction", 0.05f,
+"Minimum percentage of memory we expect to be reclaimed after a 
Full " +
+"GC. If less than this amount is reclaimed, it is sage to say 
" +
+"we are in a high memory situation and the estimation 
mechanism " +
+"has not recognized it yet!");
+  /** If mem-usage is above this threshold, active threads are set to 0 */
+  public static final FloatConfOption AM_HIGH_THRESHOLD =
+new FloatConfOption("giraph.amHighThreshold", 0.95f,
+"If mem-usage is above this threshold, all active threads " +
+"(compute/input) are paused.");
+  /** If me

[jira] [Commented] (GIRAPH-1126) Broken Link on Introduction Page for User Docs

2016-12-16 Thread Sergey Edunov (JIRA)

[ 
https://issues.apache.org/jira/browse/GIRAPH-1126?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15755930#comment-15755930
 ] 

Sergey Edunov commented on GIRAPH-1126:
---

I believe that version from release-1.0 does not even compile now. Simply 
because Vertex class doesn't have compute() function anymore. 

So, we should either take this link: 
https://github.com/apache/giraph/blob/trunk/giraph-examples/src/main/java/org/apache/giraph/examples/SimpleShortestPathsComputation.java
  
and update intro accordingly. 

Or, much better, rewrite the whole thing using the new API and update intro as 
well.  

> Broken Link on Introduction Page for User Docs
> --
>
> Key: GIRAPH-1126
> URL: https://issues.apache.org/jira/browse/GIRAPH-1126
> Project: Giraph
>  Issue Type: Task
>  Components: site
> Environment: Chrome Browser v54.0.2840.98 on macOS Sierra v10.12.1
>Reporter: Michael Aro
>Assignee: Michael Aro
>Priority: Trivial
>  Labels: documentation
>
> On the Introduction page of the User Docs is a broken link. The "here" link 
> before the code snippet on the page has a broken link to a java file on the 
> Github site. 
> URL: http://giraph.apache.org/intro.html



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)