Skip to content
Merged
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
11 changes: 9 additions & 2 deletions conf/defaults.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,7 @@ storm.resource.isolation.plugin: "org.apache.storm.container.cgroup.CgroupManage
# Also determines whether the unit tests for cgroup runs.
# If storm.resource.isolation.plugin.enable is set to false the unit tests for cgroups will not run
storm.resource.isolation.plugin.enable: false
storm.cgroup.memory.enforcement.enable: false

# Configs for CGroup support
storm.cgroup.hierarchy.dir: "/cgroup/storm_resources"
Expand All @@ -304,12 +305,18 @@ storm.cgroup.resources:
storm.cgroup.hierarchy.name: "storm"
storm.supervisor.cgroup.rootdir: "storm"
storm.cgroup.cgexec.cmd: "/bin/cgexec"
storm.cgroup.memory.limit.tolerance.margin.mb: 128.0
storm.cgroup.memory.limit.tolerance.margin.mb: 0.0
storm.supervisor.memory.limit.tolerance.margin.mb: 128.0
storm.supervisor.hard.memory.limit.multiplier: 2.0
storm.supervisor.hard.memory.limit.overage.mb: 2024
storm.supervisor.low.memory.threshold.mb: 1024
storm.supervisor.medium.memory.threshold.mb: 1536
storm.supervisor.medium.memory.grace.period.ms: 30000
storm.topology.classpath.beginning.enabled: false
worker.metrics:
"CGroupMemory": "org.apache.storm.metric.cgroup.CGroupMemoryUsage"
"CGroupMemoryLimit": "org.apache.storm.metric.cgroup.CGroupMemoryLimit"
"CGroupCpu": "org.apache.storm.metric.cgroup.CGroupCpu"
"CGroupCpuGuarantee": "org.apache.storm.metric.cgroup.CGroupCpuGuarantee"

num.stat.buckets: 20
num.stat.buckets: 20
40 changes: 40 additions & 0 deletions dev-tools/checkstyle.xslt
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
<?xml version="1.0"?>
<!--
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.
-->

<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="text" omit-xml-declaration="yes" indent="no"/>
<xsl:template match="/">
<xsl:for-each select="checkstyle/file">
<xsl:if test="@name=$target">
<xsl:value-of select="@name"/>
<xsl:text>
</xsl:text>
<xsl:for-each select="error">
<xsl:text> </xsl:text>
<xsl:value-of select="@line"/>
<xsl:text>: </xsl:text>
<xsl:value-of select="@message"/>
<xsl:text>
</xsl:text>
</xsl:for-each>
</xsl:if>
</xsl:for-each>
</xsl:template>

</xsl:stylesheet>
38 changes: 38 additions & 0 deletions dev-tools/find-checkstyle-issues.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
#!/usr/bin/python
# -*- coding: utf-8 -*-
# Licensed 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.

import sys
import os
from optparse import OptionParser
import subprocess

def getCheckstyleFor(f, check_result):
f = os.path.abspath(f)
check_result = os.path.abspath(check_result)
ret = subprocess.check_output(['xsltproc', '--stringparam', 'target', f, './dev-tools/checkstyle.xslt', check_result])
if not ret.isspace():
print ret

def main():
parser = OptionParser(usage="usage: %prog [options]")
parser.add_option("-c", "--checkstyle-result", dest="check_result",
type="string", help="the checkstyle-result.xml file to parse", metavar="FILE")

(options, args) = parser.parse_args()

for f in args:
getCheckstyleFor(f, options.check_result)

if __name__ == "__main__":
main()
Loading