chukwa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ey...@apache.org
Subject svn commit: r1001540 - in /incubator/chukwa/trunk: ./ conf/ lib/ src/java/org/apache/hadoop/chukwa/datacollection/adaptor/sigar/ src/java/org/apache/hadoop/chukwa/extraction/demux/processor/mapper/
Date Sun, 26 Sep 2010 22:27:44 GMT
Author: eyang
Date: Sun Sep 26 22:27:43 2010
New Revision: 1001540

URL: http://svn.apache.org/viewvc?rev=1001540&view=rev
Log:
CHUKWA-419. Replaced system metrics collection with Sigar. (Eric Yang)

Added:
    incubator/chukwa/trunk/lib/libsigar-amd64-freebsd-6.so   (with props)
    incubator/chukwa/trunk/lib/libsigar-amd64-linux.so   (with props)
    incubator/chukwa/trunk/lib/libsigar-amd64-solaris-1.so   (with props)
    incubator/chukwa/trunk/lib/libsigar-amd64-solaris.so   (with props)
    incubator/chukwa/trunk/lib/libsigar-ia64-hpux-11.sl   (with props)
    incubator/chukwa/trunk/lib/libsigar-ia64-linux.so   (with props)
    incubator/chukwa/trunk/lib/libsigar-pa-hpux-11.sl   (with props)
    incubator/chukwa/trunk/lib/libsigar-ppc-aix-5.so   (with props)
    incubator/chukwa/trunk/lib/libsigar-ppc-linux.so   (with props)
    incubator/chukwa/trunk/lib/libsigar-ppc64-aix-5.so   (with props)
    incubator/chukwa/trunk/lib/libsigar-ppc64-linux.so   (with props)
    incubator/chukwa/trunk/lib/libsigar-s390x-linux.so   (with props)
    incubator/chukwa/trunk/lib/libsigar-sparc-solaris.so   (with props)
    incubator/chukwa/trunk/lib/libsigar-sparc64-solaris.so   (with props)
    incubator/chukwa/trunk/lib/libsigar-universal-macosx.dylib   (with props)
    incubator/chukwa/trunk/lib/libsigar-universal64-macosx.dylib   (with props)
    incubator/chukwa/trunk/lib/libsigar-x86-freebsd-5.so   (with props)
    incubator/chukwa/trunk/lib/libsigar-x86-freebsd-6.so   (with props)
    incubator/chukwa/trunk/lib/libsigar-x86-linux.so   (with props)
    incubator/chukwa/trunk/lib/libsigar-x86-solaris.so   (with props)
    incubator/chukwa/trunk/lib/sigar-LICENSE.txt
    incubator/chukwa/trunk/lib/sigar-amd64-winnt.dll   (with props)
    incubator/chukwa/trunk/lib/sigar-x86-winnt.dll   (with props)
    incubator/chukwa/trunk/lib/sigar-x86-winnt.lib   (with props)
    incubator/chukwa/trunk/lib/sigar.jar   (with props)
    incubator/chukwa/trunk/src/java/org/apache/hadoop/chukwa/datacollection/adaptor/sigar/
    incubator/chukwa/trunk/src/java/org/apache/hadoop/chukwa/datacollection/adaptor/sigar/SigarRunner.java
    incubator/chukwa/trunk/src/java/org/apache/hadoop/chukwa/datacollection/adaptor/sigar/SystemMetrics.java
    incubator/chukwa/trunk/src/java/org/apache/hadoop/chukwa/extraction/demux/processor/mapper/SystemMetrics.java
Modified:
    incubator/chukwa/trunk/CHANGES.txt
    incubator/chukwa/trunk/conf/chukwa-demux-conf.xml.template

Modified: incubator/chukwa/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/incubator/chukwa/trunk/CHANGES.txt?rev=1001540&r1=1001539&r2=1001540&view=diff
==============================================================================
--- incubator/chukwa/trunk/CHANGES.txt (original)
+++ incubator/chukwa/trunk/CHANGES.txt Sun Sep 26 22:27:43 2010
@@ -4,6 +4,8 @@ Trunk (unreleased changes)
 
   NEW FEATURES
 
+    CHUKWA-419. Replaced system metrics collection with Sigar. (Eric Yang)
+
     CHUKWA-444. Added HBaseWriter for storing time series data in HBase for faster random
read/write. (Eric Yang)
 
     CHUKWA-473.  Make default processor configurable. (Bill Graham via asrabkin)
@@ -16,6 +18,8 @@ Trunk (unreleased changes)
 
   IMPROVEMENTS
 
+    CHUKWA-521. Changed default HICC port to 4080. (Eric Yang)
+
     CHUKWA-506. Added retry logic for MetricDataLoader (William Bajzek via Eric Yang)
 
     CHUKWA-507. Imrpoved url validation for JMSAdaptor. (Bill Graham via Eric Yang)

Modified: incubator/chukwa/trunk/conf/chukwa-demux-conf.xml.template
URL: http://svn.apache.org/viewvc/incubator/chukwa/trunk/conf/chukwa-demux-conf.xml.template?rev=1001540&r1=1001539&r2=1001540&view=diff
==============================================================================
--- incubator/chukwa/trunk/conf/chukwa-demux-conf.xml.template (original)
+++ incubator/chukwa/trunk/conf/chukwa-demux-conf.xml.template Sun Sep 26 22:27:43 2010
@@ -224,5 +224,10 @@
     <description></description>
    </property>
    
+   <property>
+    <name>SystemMetrics</name>
+    <value>org.apache.hadoop.chukwa.extraction.demux.processor.mapper.SystemMetrics</value>
+    <description></description>
+   </property>
 </configuration>
  

Added: incubator/chukwa/trunk/lib/libsigar-amd64-freebsd-6.so
URL: http://svn.apache.org/viewvc/incubator/chukwa/trunk/lib/libsigar-amd64-freebsd-6.so?rev=1001540&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/chukwa/trunk/lib/libsigar-amd64-freebsd-6.so
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/chukwa/trunk/lib/libsigar-amd64-linux.so
URL: http://svn.apache.org/viewvc/incubator/chukwa/trunk/lib/libsigar-amd64-linux.so?rev=1001540&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/chukwa/trunk/lib/libsigar-amd64-linux.so
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/chukwa/trunk/lib/libsigar-amd64-solaris-1.so
URL: http://svn.apache.org/viewvc/incubator/chukwa/trunk/lib/libsigar-amd64-solaris-1.so?rev=1001540&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/chukwa/trunk/lib/libsigar-amd64-solaris-1.so
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/chukwa/trunk/lib/libsigar-amd64-solaris.so
URL: http://svn.apache.org/viewvc/incubator/chukwa/trunk/lib/libsigar-amd64-solaris.so?rev=1001540&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/chukwa/trunk/lib/libsigar-amd64-solaris.so
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/chukwa/trunk/lib/libsigar-ia64-hpux-11.sl
URL: http://svn.apache.org/viewvc/incubator/chukwa/trunk/lib/libsigar-ia64-hpux-11.sl?rev=1001540&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/chukwa/trunk/lib/libsigar-ia64-hpux-11.sl
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/chukwa/trunk/lib/libsigar-ia64-linux.so
URL: http://svn.apache.org/viewvc/incubator/chukwa/trunk/lib/libsigar-ia64-linux.so?rev=1001540&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/chukwa/trunk/lib/libsigar-ia64-linux.so
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/chukwa/trunk/lib/libsigar-pa-hpux-11.sl
URL: http://svn.apache.org/viewvc/incubator/chukwa/trunk/lib/libsigar-pa-hpux-11.sl?rev=1001540&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/chukwa/trunk/lib/libsigar-pa-hpux-11.sl
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/chukwa/trunk/lib/libsigar-ppc-aix-5.so
URL: http://svn.apache.org/viewvc/incubator/chukwa/trunk/lib/libsigar-ppc-aix-5.so?rev=1001540&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/chukwa/trunk/lib/libsigar-ppc-aix-5.so
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/chukwa/trunk/lib/libsigar-ppc-linux.so
URL: http://svn.apache.org/viewvc/incubator/chukwa/trunk/lib/libsigar-ppc-linux.so?rev=1001540&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/chukwa/trunk/lib/libsigar-ppc-linux.so
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/chukwa/trunk/lib/libsigar-ppc64-aix-5.so
URL: http://svn.apache.org/viewvc/incubator/chukwa/trunk/lib/libsigar-ppc64-aix-5.so?rev=1001540&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/chukwa/trunk/lib/libsigar-ppc64-aix-5.so
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/chukwa/trunk/lib/libsigar-ppc64-linux.so
URL: http://svn.apache.org/viewvc/incubator/chukwa/trunk/lib/libsigar-ppc64-linux.so?rev=1001540&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/chukwa/trunk/lib/libsigar-ppc64-linux.so
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/chukwa/trunk/lib/libsigar-s390x-linux.so
URL: http://svn.apache.org/viewvc/incubator/chukwa/trunk/lib/libsigar-s390x-linux.so?rev=1001540&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/chukwa/trunk/lib/libsigar-s390x-linux.so
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/chukwa/trunk/lib/libsigar-sparc-solaris.so
URL: http://svn.apache.org/viewvc/incubator/chukwa/trunk/lib/libsigar-sparc-solaris.so?rev=1001540&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/chukwa/trunk/lib/libsigar-sparc-solaris.so
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/chukwa/trunk/lib/libsigar-sparc64-solaris.so
URL: http://svn.apache.org/viewvc/incubator/chukwa/trunk/lib/libsigar-sparc64-solaris.so?rev=1001540&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/chukwa/trunk/lib/libsigar-sparc64-solaris.so
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/chukwa/trunk/lib/libsigar-universal-macosx.dylib
URL: http://svn.apache.org/viewvc/incubator/chukwa/trunk/lib/libsigar-universal-macosx.dylib?rev=1001540&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/chukwa/trunk/lib/libsigar-universal-macosx.dylib
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/chukwa/trunk/lib/libsigar-universal64-macosx.dylib
URL: http://svn.apache.org/viewvc/incubator/chukwa/trunk/lib/libsigar-universal64-macosx.dylib?rev=1001540&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/chukwa/trunk/lib/libsigar-universal64-macosx.dylib
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/chukwa/trunk/lib/libsigar-x86-freebsd-5.so
URL: http://svn.apache.org/viewvc/incubator/chukwa/trunk/lib/libsigar-x86-freebsd-5.so?rev=1001540&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/chukwa/trunk/lib/libsigar-x86-freebsd-5.so
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/chukwa/trunk/lib/libsigar-x86-freebsd-6.so
URL: http://svn.apache.org/viewvc/incubator/chukwa/trunk/lib/libsigar-x86-freebsd-6.so?rev=1001540&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/chukwa/trunk/lib/libsigar-x86-freebsd-6.so
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/chukwa/trunk/lib/libsigar-x86-linux.so
URL: http://svn.apache.org/viewvc/incubator/chukwa/trunk/lib/libsigar-x86-linux.so?rev=1001540&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/chukwa/trunk/lib/libsigar-x86-linux.so
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/chukwa/trunk/lib/libsigar-x86-solaris.so
URL: http://svn.apache.org/viewvc/incubator/chukwa/trunk/lib/libsigar-x86-solaris.so?rev=1001540&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/chukwa/trunk/lib/libsigar-x86-solaris.so
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/chukwa/trunk/lib/sigar-LICENSE.txt
URL: http://svn.apache.org/viewvc/incubator/chukwa/trunk/lib/sigar-LICENSE.txt?rev=1001540&view=auto
==============================================================================
--- incubator/chukwa/trunk/lib/sigar-LICENSE.txt (added)
+++ incubator/chukwa/trunk/lib/sigar-LICENSE.txt Sun Sep 26 22:27:43 2010
@@ -0,0 +1,288 @@
+
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright [yyyy] [name of copyright owner]
+
+   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.
+
+
+
+
+APPENDIX II:  Licenses for Incorporated Works.
+
+
+
+Script.aculo.us
+Copyright © 2005-2008 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us)
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+“Software”), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+--------
+YUI
+Copyright Yahoo inc, 2009
+Redistribution and use of this software in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
+
+    * Redistributions of source code must retain the above copyright notice, this list of
conditions and the
+      following disclaimer.
+    * Redistributions in binary form must reproduce the above copyright notice, this list
of conditions and the following disclaimer in the documentation and/or other materials provided
with the distribution.
+    * Neither the name of Yahoo! Inc. nor the names of its contributors may be used to endorse
or promote products derived from this software without specific prior written permission of
Yahoo! Inc.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS
OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+--------
+IUI
+Copyright (c) 2007-2009, iUI Project Members
+
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without modification, are permitted
provided that the following conditions are met:
+
+    * Redistributions of source code must retain the above copyright notice, this list of
conditions and the following disclaimer.
+    * Redistributions in binary form must reproduce the above copyright notice, this list
of conditions and the following disclaimer in the documentation and/or other materials provided
with the distribution.
+    * Neither the name of the iUI Project nor the names of its contributors may be used to
endorse or promote products derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+-------
+jChronic
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
+

Added: incubator/chukwa/trunk/lib/sigar-amd64-winnt.dll
URL: http://svn.apache.org/viewvc/incubator/chukwa/trunk/lib/sigar-amd64-winnt.dll?rev=1001540&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/chukwa/trunk/lib/sigar-amd64-winnt.dll
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/chukwa/trunk/lib/sigar-x86-winnt.dll
URL: http://svn.apache.org/viewvc/incubator/chukwa/trunk/lib/sigar-x86-winnt.dll?rev=1001540&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/chukwa/trunk/lib/sigar-x86-winnt.dll
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/chukwa/trunk/lib/sigar-x86-winnt.lib
URL: http://svn.apache.org/viewvc/incubator/chukwa/trunk/lib/sigar-x86-winnt.lib?rev=1001540&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/chukwa/trunk/lib/sigar-x86-winnt.lib
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/chukwa/trunk/lib/sigar.jar
URL: http://svn.apache.org/viewvc/incubator/chukwa/trunk/lib/sigar.jar?rev=1001540&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/chukwa/trunk/lib/sigar.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/chukwa/trunk/src/java/org/apache/hadoop/chukwa/datacollection/adaptor/sigar/SigarRunner.java
URL: http://svn.apache.org/viewvc/incubator/chukwa/trunk/src/java/org/apache/hadoop/chukwa/datacollection/adaptor/sigar/SigarRunner.java?rev=1001540&view=auto
==============================================================================
--- incubator/chukwa/trunk/src/java/org/apache/hadoop/chukwa/datacollection/adaptor/sigar/SigarRunner.java
(added)
+++ incubator/chukwa/trunk/src/java/org/apache/hadoop/chukwa/datacollection/adaptor/sigar/SigarRunner.java
Sun Sep 26 22:27:43 2010
@@ -0,0 +1,139 @@
+/*
+ * 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.hadoop.chukwa.datacollection.adaptor.sigar;
+
+import java.util.HashMap;
+import java.util.Map;
+import java.util.TimerTask;
+
+import org.apache.hadoop.chukwa.ChunkImpl;
+import org.apache.hadoop.chukwa.datacollection.ChunkReceiver;
+import org.apache.hadoop.chukwa.datacollection.adaptor.ExecAdaptor;
+import org.apache.hadoop.chukwa.util.ExceptionUtil;
+import org.apache.log4j.Logger;
+import org.hyperic.sigar.CpuInfo;
+import org.hyperic.sigar.CpuPerc;
+import org.hyperic.sigar.FileSystem;
+import org.hyperic.sigar.FileSystemUsage;
+import org.hyperic.sigar.Mem;
+import org.hyperic.sigar.NetInterfaceStat;
+import org.hyperic.sigar.Sigar;
+import org.hyperic.sigar.SigarException;
+import org.hyperic.sigar.Uptime;
+import org.json.JSONArray;
+import org.json.JSONObject;
+
+/**
+ * TimerTask for collect system metrics from Hyperic Sigar.
+ */
+public class SigarRunner extends TimerTask {
+
+  private static Sigar sigar = new Sigar();
+  private static Logger log = Logger.getLogger(SigarRunner.class);
+  private ChunkReceiver receiver = null;
+  private long sendOffset = 0;
+  private SystemMetrics systemMetrics;
+  
+  public SigarRunner(ChunkReceiver dest, SystemMetrics systemMetrics) {
+    receiver = dest;
+    this.systemMetrics = systemMetrics;
+  }
+  
+  @Override
+  public void run() {
+    CpuInfo[] cpuinfo = null;
+    CpuPerc[] cpuPerc = null;
+    Mem mem = null;
+    FileSystem[] fs = null;
+    String[] netIf = null;
+    Uptime uptime = null;
+    double[] loadavg = null;
+    JSONObject json = new JSONObject();
+    try {
+      // CPU utilization
+      cpuinfo = sigar.getCpuInfoList();
+      cpuPerc = sigar.getCpuPercList();
+      JSONArray cpuList = new JSONArray();
+      for (int i = 0; i < cpuinfo.length; i++) {
+        JSONObject cpuMap = new JSONObject(cpuinfo[i].toMap());
+        cpuMap.put("combined", cpuPerc[i].getCombined());
+        cpuMap.put("user", cpuPerc[i].getUser());
+        cpuMap.put("sys", cpuPerc[i].getSys());
+        cpuMap.put("idle", cpuPerc[i].getIdle());
+        cpuMap.put("wait", cpuPerc[i].getWait());
+        cpuMap.put("nice", cpuPerc[i].getNice());
+        cpuMap.put("irq", cpuPerc[i].getIrq());
+        cpuList.put(cpuMap);
+      }
+      sigar.getCpuPerc();
+      json.put("cpu", cpuList);
+      
+      // Uptime
+      uptime = sigar.getUptime();
+      json.put("uptime", uptime.getUptime());
+      
+      // Load Average
+      loadavg = sigar.getLoadAverage();
+      JSONArray load = new JSONArray();
+      load.put(loadavg[0]);
+      load.put(loadavg[1]);
+      load.put(loadavg[2]);
+      json.put("loadavg", load);
+
+      // Memory Utilization
+      mem = sigar.getMem();
+      JSONObject memMap = new JSONObject(mem.toMap());
+      json.put("memory", memMap);
+      
+      // Network Utilization
+      netIf = sigar.getNetInterfaceList();
+      JSONArray netInterfaces = new JSONArray();
+      for (int i = 0; i < netIf.length; i++) {
+        NetInterfaceStat net = new NetInterfaceStat();
+        net = sigar.getNetInterfaceStat(netIf[i]);
+        JSONObject netMap = new JSONObject(net.toMap());
+        netInterfaces.put(netMap);
+      }
+      json.put("network", netInterfaces);
+
+      // Filesystem Utilization
+      fs = sigar.getFileSystemList();
+      JSONArray fsList = new JSONArray();
+      for (int i = 0; i < fs.length; i++) {
+        JSONObject fsMap = new JSONObject(fs[i].toMap());
+        FileSystemUsage usage = sigar.getFileSystemUsage(fs[i].getDirName());
+        fsMap.put("DiskReadBytes", usage.getDiskReadBytes());
+        fsMap.put("DiskReads", usage.getDiskReads());
+        fsMap.put("DiskWriteBytes", usage.getDiskWriteBytes());
+        fsMap.put("DiskWrites", usage.getDiskWrites());
+        fsList.put(fsMap);
+      }
+      json.put("disk", fsList);
+      json.put("timestamp", System.currentTimeMillis());
+      byte[] data = json.toString().getBytes();
+      sendOffset += data.length;
+      ChunkImpl c = new ChunkImpl("SystemMetrics", "Sigar", sendOffset, data, systemMetrics);
+      
+      receiver.add(c);
+    } catch (Exception se) {
+      log.error(ExceptionUtil.getStackTrace(se));
+    }
+  }
+
+}

Added: incubator/chukwa/trunk/src/java/org/apache/hadoop/chukwa/datacollection/adaptor/sigar/SystemMetrics.java
URL: http://svn.apache.org/viewvc/incubator/chukwa/trunk/src/java/org/apache/hadoop/chukwa/datacollection/adaptor/sigar/SystemMetrics.java?rev=1001540&view=auto
==============================================================================
--- incubator/chukwa/trunk/src/java/org/apache/hadoop/chukwa/datacollection/adaptor/sigar/SystemMetrics.java
(added)
+++ incubator/chukwa/trunk/src/java/org/apache/hadoop/chukwa/datacollection/adaptor/sigar/SystemMetrics.java
Sun Sep 26 22:27:43 2010
@@ -0,0 +1,94 @@
+/*
+ * 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.
+ */
+
+/**
+ * Adaptor that is able to collect system metrics by using Hyperic Sigar.
+ * <P>
+ * This adaptor is added to an Agent like so:
+ * <code>
+ * add SystemMetrics [dataType] [seconds]
+ * </code>
+ * <ul>
+ * <li><code>dataType</code> - The chukwa data type, use SystemMetrics
to map to 
+ * default SystemMetrics demux parser.</li>
+ * <li><code>seconds</code> - Interval to collect system metrics, default
is 60 seconds.</li>
+ * </ul>
+ * </P>
+ */
+package org.apache.hadoop.chukwa.datacollection.adaptor.sigar;
+
+import java.util.Timer;
+
+import org.apache.hadoop.chukwa.datacollection.adaptor.AbstractAdaptor;
+import org.apache.hadoop.chukwa.datacollection.adaptor.AdaptorException;
+import org.apache.hadoop.chukwa.datacollection.adaptor.AdaptorShutdownPolicy;
+import org.apache.hadoop.chukwa.datacollection.adaptor.jms.JMSMessageTransformer;
+import org.apache.hadoop.chukwa.datacollection.adaptor.jms.JMSTextMessageTransformer;
+import org.apache.log4j.Logger;
+
+public class SystemMetrics extends AbstractAdaptor {
+  static Logger log = Logger.getLogger(SystemMetrics.class);
+  private long period = 60 * 1000;
+  private SigarRunner runner;
+  private Timer timer;
+  
+  @Override
+  public String parseArgs(String args) {
+    int spOffset = args.indexOf(' ');
+    if (spOffset > 0) {
+      try {
+        period = Integer.parseInt(args.substring(0, spOffset));
+        period = period * 1000;
+      } catch (NumberFormatException e) {
+        StringBuilder buffer = new StringBuilder();
+        buffer.append("SystemMetrics: sample interval ");
+        buffer.append(args.substring(0, spOffset));
+        buffer.append(" can't be parsed.");
+        log.warn(buffer.toString());
+      }
+    }    
+    return args;
+  }
+
+  @Override
+  public void start(long offset) throws AdaptorException {
+    if(timer == null) {
+      timer = new Timer();
+      runner = new SigarRunner(dest, SystemMetrics.this);
+    }
+    timer.scheduleAtFixedRate(runner, 0, period);
+    
+  }
+
+  @Override
+  public String getCurrentStatus() {
+    StringBuilder buffer = new StringBuilder();
+    buffer.append(type);
+    buffer.append(" ");
+    buffer.append(period/1000);
+    return buffer.toString();
+  }
+
+  @Override
+  public long shutdown(AdaptorShutdownPolicy shutdownPolicy)
+      throws AdaptorException {
+    timer.cancel();
+    return 0;
+  }
+
+}

Added: incubator/chukwa/trunk/src/java/org/apache/hadoop/chukwa/extraction/demux/processor/mapper/SystemMetrics.java
URL: http://svn.apache.org/viewvc/incubator/chukwa/trunk/src/java/org/apache/hadoop/chukwa/extraction/demux/processor/mapper/SystemMetrics.java?rev=1001540&view=auto
==============================================================================
--- incubator/chukwa/trunk/src/java/org/apache/hadoop/chukwa/extraction/demux/processor/mapper/SystemMetrics.java
(added)
+++ incubator/chukwa/trunk/src/java/org/apache/hadoop/chukwa/extraction/demux/processor/mapper/SystemMetrics.java
Sun Sep 26 22:27:43 2010
@@ -0,0 +1,116 @@
+/*
+ * 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.
+ */
+
+/**
+ * Demux parser for system metrics data collected through
+ * org.apache.hadoop.chukwa.datacollection.adaptor.sigar.SystemMetrics.
+ */
+package org.apache.hadoop.chukwa.extraction.demux.processor.mapper;
+
+import java.util.Calendar;
+import java.util.Iterator;
+import java.util.TimeZone;
+
+import org.apache.hadoop.chukwa.datacollection.writer.hbase.Annotation.Table;
+import org.apache.hadoop.chukwa.datacollection.writer.hbase.Annotation.Tables;
+import org.apache.hadoop.chukwa.extraction.engine.ChukwaRecord;
+import org.apache.hadoop.chukwa.extraction.engine.ChukwaRecordKey;
+import org.apache.hadoop.mapred.OutputCollector;
+import org.apache.hadoop.mapred.Reporter;
+import org.json.JSONArray;
+import org.json.JSONObject;
+
+@Tables(annotations={
+    @Table(name="SystemMetrics",columnFamily="cpu"),
+    @Table(name="SystemMetrics",columnFamily="system"),
+    @Table(name="SystemMetrics",columnFamily="memory"),
+    @Table(name="SystemMetrics",columnFamily="network"),
+    @Table(name="SystemMetrics",columnFamily="disk")
+    })
+public class SystemMetrics extends AbstractProcessor {
+
+  @Override
+  protected void parse(String recordEntry,
+      OutputCollector<ChukwaRecordKey, ChukwaRecord> output, Reporter reporter)
+      throws Throwable {
+    JSONObject json = new JSONObject(recordEntry);
+    long timestamp = Long.parseLong(json.getString("timestamp"));
+    ChukwaRecord record = new ChukwaRecord();
+    Calendar cal = Calendar.getInstance(TimeZone.getTimeZone("UTC"));
+    cal.setTimeInMillis(timestamp);
+    cal.set(Calendar.SECOND, 0);
+    cal.set(Calendar.MILLISECOND, 0);
+    JSONArray cpuList = json.getJSONArray("cpu");
+    for(int i = 0; i< cpuList.length(); i++) {
+      JSONObject cpu = cpuList.getJSONObject(i);
+      Iterator<String> keys = cpu.keys();
+      while(keys.hasNext()) {
+        String key = keys.next();
+        record.add(key + "." + i, cpu.getString(key));
+      }
+    }
+    buildGenericRecord(record, null, cal.getTimeInMillis(), "cpu");
+    output.collect(key, record);    
+
+    record = new ChukwaRecord();
+    record.add("Uptime", json.getString("uptime"));
+    JSONArray loadavg = json.getJSONArray("loadavg");
+    record.add("LoadAverage.1", loadavg.getString(0));
+    record.add("LoadAverage.5", loadavg.getString(1));
+    record.add("LoadAverage.15", loadavg.getString(2));
+    buildGenericRecord(record, null, cal.getTimeInMillis(), "system");
+    output.collect(key, record);    
+
+    record = new ChukwaRecord();
+    JSONObject memory = json.getJSONObject("memory");
+    Iterator<String> memKeys = memory.keys();
+    while(memKeys.hasNext()) {
+      String key = memKeys.next();
+      record.add(key, memory.getString(key));
+    }
+    buildGenericRecord(record, null, cal.getTimeInMillis(), "memory");
+    output.collect(key, record);    
+    
+    record = new ChukwaRecord();
+    JSONArray netList = json.getJSONArray("network");
+    for(int i = 0;i < netList.length(); i++) {
+      JSONObject netIf = netList.getJSONObject(i);
+      Iterator<String> keys = netIf.keys();
+      while(keys.hasNext()) {
+        String key = keys.next();
+        record.add(key + "." + i, netIf.getString(key));
+      }
+    }
+    buildGenericRecord(record, null, cal.getTimeInMillis(), "network");
+    output.collect(key, record);    
+    
+    record = new ChukwaRecord();
+    JSONArray diskList = json.getJSONArray("disk");
+    for(int i = 0;i < netList.length(); i++) {
+      JSONObject disk = netList.getJSONObject(i);
+      Iterator<String> keys = disk.keys();
+      while(keys.hasNext()) {
+        String key = keys.next();
+        record.add(key + "." + i, disk.getString(key));
+      }
+    }    
+    buildGenericRecord(record, null, cal.getTimeInMillis(), "disk");
+    output.collect(key, record);    
+  }
+
+}



Mime
View raw message