Has no returnvalue (just like WebHDFS)
162854
def mkdir(self, path, parents=True, mode=0o755, raise_if_exists=False):
        
        if not parents or raise_if_exists:
            warnings.warn('webhdfs mkdir: parents/raise_if_exists not implemented')
        permission = int(oct(mode)[2:])  # Convert from int(decimal) to int(octal)
        self.client.makedirs(path, permission=permission)
82967
def dump(self, fh, value, context=None):
		
		
		value = self.dumps(value)
		fh.write(value)
		return len(value)
968454
function () {
        var value = this.valueOf();

        // returns empty string if the value is
        // null or undefined or does not implement a toString
        return (!_.isNil(value) && _.isFunction(value.toString)) ? value.toString() : E;
    }
266954
public static boolean isHdfsUri(URI endpoint)
    {
        final String path = endpoint.getPath();
        if (path != null && path.indexOf('/', 1) != -1) {
            return path.substring(1, path.indexOf('/', 1)).equalsIgnoreCase("webhdfs");
        } else {
            return false;
        }
    }
1211651
@Override
    public File getFileWithDefault(String key, String file) {
        String value = get(key);
        if (value == null) {
            return new File(baseDirectory, file);
        } else {
            return new File(baseDirectory, value);
        }
    }
217144
function(url, properties, depth, headers) {

        if(typeof depth === "undefined") {
            depth = '0';
        }

        // depth header must be a string, in case a number was passed in
        depth = '' + depth;

        headers = headers || {};

        headers['Depth'] = depth;
        headers['Content-Type'] = 'application/xml; charset=utf-8';

        var body =
            '<?xml version="1.0"?>\n' +
            '<d:propfind ';
        var namespace;
        for (namespace in this.xmlNamespaces) {
            body += ' xmlns:' + this.xmlNamespaces[namespace] + '="' + namespace + '"';
        }
        body += '>\n' +
            '  <d:prop>\n';

        for(var ii in properties) {
            if (!properties.hasOwnProperty(ii)) {
                continue;
            }

            var property = this.parseClarkNotation(properties[ii]);
            if (this.xmlNamespaces[property.namespace]) {
                body+='    <' + this.xmlNamespaces[property.namespace] + ':' + property.name + ' />\n';
            } else {
                body+='    <x:' + property.name + ' xmlns:x="' + property.namespace + '" />\n';
            }

        }
        body+='  </d:prop>\n';
        body+='</d:propfind>';

        return this.request('PROPFIND', url, headers, body).then(
            function(result) {

                if (depth === '0') {
                    return {
                        status: result.status,
                        body: result.body[0],
                        xhr: result.xhr
                    };
                } else {
                    return {
                        status: result.status,
                        body: result.body,
                        xhr: result.xhr
                    };
                }

            }.bind(this)
        );

    }
1291375
protected void _writeSimpleObject(Object value) throws IOException, JsonGenerationException {
	    /* 31-Dec-2009, tatu: Actually, we could just handle some basic
	     *    types even without codec. This can improve interoperability,
	     *    and specifically help with TokenBuffer.
	     */
	    if (value == null) {
	        writeNull();
	        return;
	    }
	    if (value instanceof String) {
	        writeString((String) value);
	        return;
	    }
	    if (value instanceof Number) {
	        Number n = (Number) value;
	        if (n instanceof Integer) {
	            writeNumber(n.intValue());
	            return;
	        } else if (n instanceof Long) {
	            writeNumber(n.longValue());
	            return;
	        } else if (n instanceof Double) {
	            writeNumber(n.doubleValue());
	            return;
	        } else if (n instanceof Float) {
	            writeNumber(n.floatValue());
	            return;
	        } else if (n instanceof Short) {
	            writeNumber(n.shortValue());
	            return;
	        } else if (n instanceof Byte) {
	            writeNumber(n.byteValue());
	            return;
	        } else if (n instanceof BigInteger) {
	            writeNumber((BigInteger) n);
	            return;
	        } else if (n instanceof BigDecimal) {
	            writeNumber((BigDecimal) n);
	            return;
	            
	        // then Atomic types
	            
	        } else if (n instanceof AtomicInteger) {
	            writeNumber(((AtomicInteger) n).get());
	            return;
	        } else if (n instanceof AtomicLong) {
	            writeNumber(((AtomicLong) n).get());
	            return;
	        }
	    } else if (value instanceof Boolean) {
	        writeBoolean(((Boolean) value).booleanValue());
	        return;
	    } else if (value instanceof AtomicBoolean) {
	        writeBoolean(((AtomicBoolean) value).get());
	        return;
	    }
	    throw new IllegalStateException("No ObjectCodec defined for the generator, can only serialize simple wrapper types (type passed "
	            +value.getClass().getName()+")");
	}
1272627
private AttributeValue[] buildAttributeValue(final String[] real_names) throws DevFailed {
	// Allocate memory for the AttributeValue structures
	AttributeValue[] back = new AttributeValue[0];
	// noinspection ErrorNotRethrown
	try {
	    back = new AttributeValue[real_names.length];
	    for (int i = 0; i < real_names.length; i++) {
		back[i] = new AttributeValue();
	    }
	} catch (final OutOfMemoryError ex) {
	    Except.throw_exception("API_MemoryAllocation", "Can't allocate memory in server",
		    "DeviceImpl.read_attributes");
	}

	// Build the sequence returned to caller for readable attributes and
	// check
	// that all the wanted attributes set value has been updated
	for (int i = 0; i < real_names.length; i++) {
	    final Attribute att = dev_attr.get_attr_by_name(real_names[i]);
	    if (att.get_value_flag()) {
		final AttrWriteType w_type = att.get_writable();
		if (w_type == AttrWriteType.READ || w_type == AttrWriteType.READ_WRITE
			|| w_type == AttrWriteType.READ_WITH_WRITE) {
		    if (w_type == AttrWriteType.READ_WRITE
			    || w_type == AttrWriteType.READ_WITH_WRITE) {
			dev_attr.add_write_value(att);
		    }

		    if (att.is_alarmed() == true
			    && att.get_quality().value() != AttrQuality._ATTR_INVALID) {
			att.check_alarm();
		    }
		}
		back[i].time = att.get_when();
		back[i].quality = att.get_quality();
		back[i].name = att.get_name();
		back[i].dim_x = att.get_x();
		back[i].dim_y = att.get_y();

		final Util tg = Util.instance();
		back[i].value = tg.get_orb().create_any();

		switch (att.get_data_type()) {
		case Tango_DEV_BOOLEAN:
		    DevVarBooleanArrayHelper.insert(back[i].value, att.get_boolean_value());
		    break;

		case Tango_DEV_SHORT:
		    DevVarShortArrayHelper.insert(back[i].value, att.get_short_value());
		    break;

		case Tango_DEV_USHORT:
		    DevVarUShortArrayHelper.insert(back[i].value, att.get_short_value());
		    break;

		case Tango_DEV_LONG:
		    DevVarLongArrayHelper.insert(back[i].value, att.get_long_value());
		    break;

		case Tango_DEV_ULONG:
		    DevVarULongArrayHelper.insert(back[i].value, att.get_long_value());
		    break;

		case Tango_DEV_LONG64:
		    DevVarLong64ArrayHelper.insert(back[i].value, att.get_long64_value());
		    break;

		case Tango_DEV_ULONG64:
		    DevVarULong64ArrayHelper.insert(back[i].value, att.get_long64_value());
		    break;

		case Tango_DEV_DOUBLE:
		    DevVarDoubleArrayHelper.insert(back[i].value, att.get_double_value());
		    break;

		case Tango_DEV_STRING:
		    DevVarStringArrayHelper.insert(back[i].value, att.get_string_value());
		    break;
		case Tango_DEV_STATE:
		    DevVarStateArrayHelper.insert(back[i].value, att.get_state_value());
		    break;

		/*
		 * //======================================================== //
		 * Not possible (DevEncoded type is not transfered inside an
		 * any)
		 * //========================================================
		 * case Tango_DEV_ENCODED :
		 * DevEncodedHelper.insert(back[i].value,att.get_enc_value());
		 * break;
		 */
		default:
		    Except.throw_exception("API_DatTypeNotSupported", "Attribute " + att.get_name()
			    + " data type not supported !", "Device_2Impl.read_attributes()");
		}
	    } else {
		Except.throw_exception("API_AttrValueNotSet", "Read value for attribute "
			+ att.get_name() + " has not been updated", "DeviceImpl.read_attributes");
	    }
	} // End of for ( ; ; )
	return back;
    }
1152832
function handleFieldValue (value) {
      if (!(value instanceof Buffer || typeof value === 'string')) {
        if (is(value).a(Object)) {
          if (value instanceof fs.FileReadStream) {
            return value
          } else {
            return Unirest.serializers.json(value)
          }
        } else {
          return value.toString()
        }
      } else return value
    }
531281
function(value, space) {
    /*
      ObjectIds are serialized as @@id
      DBRefs are serialized as @@collection@id or @@collection@@id, depending on whether id is an objectid
      string values starting @ @ are prepended with ::
    */
    return JSON.stringify(value, function(k,v) {
      if (v && typeof v === 'object') {
        //we have to do it like this to avoid toString being call internally
        var copy = new v.constructor();
        for (var prop in v) {
          if (!v.hasOwnProperty(prop)) continue;
          var val = v[prop]
          if (val instanceof ObjectID) {
              val = "@@" + val;
          } else if (val instanceof DBRef) {
            if (val.oid instanceof ObjectID)
              val = '@@' + val.namespace + '@@' + val.oid;
            else
              val = '@@' + val.namespace + '@' + val.oid;
          } else {
            if (typeof val == 'string' && (val.slice(0,2) == '@@')) {
             val = '::' + val;
            }
          }
          copy[prop] = val;
        }
        return copy;
      }
      return v;
    }, space);
  }
436596
def _get_file_by_value(cls, value):
        
        # Ignore any FileResource with no DataObject. This is a typical state
        # for a deleted file that has not yet been cleaned up.
        queryset = FileResource.objects.exclude(data_object__isnull=True)
        matches = FileResource.filter_by_name_or_id_or_tag_or_hash(
            value, queryset=queryset)
        if matches.count() == 0:
            raise ValidationError(
                'No file found that matches value "%s"' % value)
        elif matches.count() > 1:
            match_id_list = ['%s@%s' % (match.filename, match.get_uuid())
                             for match in matches]
            match_id_string = ('", "'.join(match_id_list))
            raise ValidationError(
                'Multiple files were found matching value "%s": "%s". '\
                'Use a more precise identifier to select just one file.' % (
                    value, match_id_string))
        return matches.first().data_object
460416
async def container_val(self, elem, container_type, params=None):
        
        if hasattr(container_type, "serialize_archive"):
            raise ValueError("not supported")
        if self.writing:
            return await self._dump_container_val(
                self.iobj, elem, container_type, params
            )
        else:
            raise ValueError("Not supported")
18740
function (value) {
                var type = typeof value,
                    checkLength = false;
                if (value && type != 'string') {
                    // Functions have a length property, so we need to filter them out
                    if (type == 'function') {
                        // In Safari, NodeList/HTMLCollection both return "function" when using typeof, so we need
                        // to explicitly check them here.
//                        if (Ext.isSafari) {
//                            checkLength = value instanceof NodeList || value instanceof HTMLCollection;
//                        }
                    } else {
                        checkLength = true;
                    }
                }
                return checkLength ? value.length !== undefined : false;
            }
981286
function getObsValue(item, loadedDimensions, dimensionIndices, dataSets) {
  // Usually no dimensions need to be aggregated, so just return dataSets[key].obsValue.
  var key = dimensionIndices.join(":");
  var valueObject = dataSets[key];
  if (item.aggregatedDimensionIds.length === 0) {
    return defined(valueObject) ? valueObject.obsValue : null;
  }
  // This implementation can handle at most a single aggregated dimension id.
  if (item.aggregatedDimensionIds.length === 1) {
    var aggregatedDimensionId = item.aggregatedDimensionIds[0];
    var valuesToAggregate = [];
    var aggregatedDimensionIndex = getDimensionIndexById(
      loadedDimensions,
      aggregatedDimensionId
    );
    var dimension = getDimensionById(loadedDimensions, aggregatedDimensionId);
    if (!defined(dimension)) {
      console.warn(
        "Tried to aggregate on a dimension that doesn't exist, " +
          aggregatedDimensionId
      );
      return defined(valueObject) ? valueObject.obsValue : null;
    }
    dimension.values.forEach(function(thisValueObject) {
      dimensionIndices[aggregatedDimensionIndex] = thisValueObject.id;
      var thisKey = dimensionIndices.join(":");
      thisValueObject = dataSets[thisKey];
      if (defined(thisValueObject)) {
        valuesToAggregate.push(thisValueObject.obsValue);
      }
    });
    return sumArray(valuesToAggregate);
  }
  console.warn(
    "SDMX-JSON aggregatedDimensionIds - only a single dimension id is implemented."
  );
}
376508
function(key, value) {
		if (value === undefined) {
			return this.remove(key)
		}
		this.storage.write(this._namespacePrefix + key, this._serialize(value))
		return value
	}
485383
Object getValue()
        throws UtilEvalError
    {
        if ( lhs != null )
            return type == null ?
                lhs.getValue() : Primitive.wrap( lhs.getValue(), type );

        return value;
    }
544979
@Override
  public String getStorageDir(DataSegment segment, boolean useUniquePath)
  {
    // This is only called by HdfsDataSegmentPusher.push(), which will always set useUniquePath to false since any
    // 'uniqueness' will be applied not to the directory but to the filename along with the shard number. This is done
    // to avoid performance issues due to excessive HDFS directories. Hence useUniquePath is ignored here and we
    // expect it to be false.
    Preconditions.checkArgument(
        !useUniquePath,
        "useUniquePath must be false for HdfsDataSegmentPusher.getStorageDir()"
    );

    return JOINER.join(
        segment.getDataSource(),
        StringUtils.format(
            "%s_%s",
            segment.getInterval().getStart().toString(ISODateTimeFormat.basicDateTime()),
            segment.getInterval().getEnd().toString(ISODateTimeFormat.basicDateTime())
        ),
        segment.getVersion().replace(':', '_')
    );
  }