public class IPv4 extends Object implements org.apache.hadoop.io.Writable, Comparable<IPv4>
Constructor and Description |
---|
IPv4() |
IPv4(byte[] bytes) |
IPv4(String ipAddress) |
Modifier and Type | Method and Description |
---|---|
IPv4 |
and(IPv4 other) |
int |
compareTo(IPv4 o)
This is a method for range query such as 'SELECT * FROM table WHERE srcIP > 163.152.23.0 and srcIP < 163.152.23.100'
|
boolean |
equals(Object o) |
byte[] |
getBytes() |
static IPv4 |
getSubnetMask(int len) |
int |
hashCode() |
boolean |
matchGeoIP()
This function will be provided as UDF later.
|
boolean |
matchSubnet(String addr)
This function will be provided as UDF later.
|
void |
readFields(DataInput in) |
void |
set(byte[] bytes) |
void |
set(String ipAddress) |
String |
toString() |
void |
write(DataOutput out) |
public IPv4()
public IPv4(byte[] bytes)
public IPv4(String ipAddress) throws InvalidAddressException
InvalidAddressException
public static IPv4 getSubnetMask(int len)
public void set(String ipAddress) throws InvalidAddressException
InvalidAddressException
public void set(byte[] bytes)
public byte[] getBytes()
public boolean matchSubnet(String addr) throws InvalidAddressException
addr
- InvalidAddressException
public boolean matchGeoIP()
public int compareTo(IPv4 o)
compareTo
in interface Comparable<IPv4>
public void readFields(DataInput in) throws IOException
readFields
in interface org.apache.hadoop.io.Writable
IOException
public void write(DataOutput out) throws IOException
write
in interface org.apache.hadoop.io.Writable
IOException
Copyright © 2014 Apache Software Foundation. All Rights Reserved.