background preloader

Node

Facebook Twitter

Popups API (Ajax Dialogs) Running Hadoop On Ubuntu Linux (Single-Node Cluster) - Michael G. In this tutorial I will describe the required steps for setting up a pseudo-distributed, single-node Hadoop cluster backed by the Hadoop Distributed File System, running on Ubuntu Linux. Hadoop is a framework written in Java for running applications on large clusters of commodity hardware and incorporates features similar to those of the Google File System (GFS) and of the MapReduce computing paradigm. Hadoop’s HDFS is a highly fault-tolerant distributed file system and, like Hadoop in general, designed to be deployed on low-cost hardware.

It provides high throughput access to application data and is suitable for applications that have large data sets. The main goal of this tutorial is to get a simple Hadoop installation up and running so that you can play around with the software and learn more about it. This tutorial has been tested with the following software versions: Ubuntu Linux 10.04 LTS (deprecated: 8.10 LTS, 8.04, 7.10, 7.04) Hadoop 1.0.3, released May 2012 Sun Java 6 Disabling IPv6. Adding a custom element type &amp; expanding elements | drupal.o. The start and end date selection boxes proved to be a particular challenge in my upgrade of eventrepeat module. I handled it by creating my own form element type. Hook_elements First, use hook_elements() to declare the new type: 'eventrepeat_date' is the name of the new type. Also, if you want any default values, be sure to declare them either here or in the process function: <? Phpfunction eventrepeat_elements() { $type['eventrepeat_date'] = array('#input' => TRUE); return $type;}?

> Dynamic expand function Normally, #process would be declared as a "the" expand function in the element type declaration (hook_elements()), but since I needed to pass $edit and $node as function arguments in this case, I declare it for each instance of the element type. Here's how the element type is invoked when in a $form array. <? The expand function Next, write the expand function. The theming function Then, a theming function to pretty it up. <? 039;s Form-handling System (for non-node data) Drupal has a powerful, generalized form handing system - the Forms API. If you want a form in your module that is detached from the node concept, you just define an abstract representation of the form and call it from the menu handler directly using drupal_get_form() as the page handler.

The form itself gets submitted as normal, and you have complete control over it. A bare skeleton for the module (Drupal 5) might look like this: <? Phpfunction example_menu($may_cache) {$items = array(); if ($may_cache) { $items[] = array( 'path' => 'example', 'callback' => 'drupal_get_form', 'callback arguments' => array('example_form'), } return $items;}function example_form() {// define your $form here, reading from the DB as needed.}function example_form_validate($form_id, $form_values) {// Do stuff with $form_values here and set errors if needed.}function example_form_submit($form_id, $form_values) {// Do stuff with $form_values here and call DB queries if needed.}? >