This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.bam.device | |
import java.util.concurrent.TimeUnit | |
import akka.actor._ | |
import com.bam.commons.{Common, DeviceStatsCommon} | |
import com.bam.data.DeviceMacAddress | |
import com.bam.data.tag.SensorSerial | |
import com.bam.device.bloh.BlohConfig | |
import com.bam.device.bloh.client.netty.NettyAsyncUplink.UplinkMessages | |
import com.bam.device.bloh.client.netty.{NettyAsyncDownlink, NettyAsyncUplink} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE TABLE IF NOT EXISTS streamingInventoryEvents( | |
locationType text, | |
locationId int, | |
cacheTime timestamp, | |
itemNumber text, | |
tag text, | |
time timestamp, | |
scanType int, | |
pieceTag text, | |
repId int, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE TABLE IF NOT EXISTS streamingInventoryEvents( | |
locationType text, | |
locationId int, | |
cacheTime timestamp, | |
tag text, | |
time timestamp, | |
scanType int, | |
pieceTag text, | |
repId int, | |
ip text, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- name: Configure iptables for Master | |
user: root | |
hosts: "{{spark_master_group_name}}" | |
sudo: yes | |
vars_files: | |
- ../vars/network-vars.yml | |
- ../vars/spark-vars.yml | |
tasks: | |
- name: Add rule to firewall for all ports | |
iptables: chain=INPUT in_interface=eth1 source={{hostvars[item][ip_interface]['ipv4']['address']}} jump=ACCEPT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int _atoi(const _TCHAR *str) | |
{ | |
int num = 0; | |
size_t i = 0; | |
while(str[i] == ' ' || str[i] == '\r' || str[i] == '\n' || str[i] == '\t') | |
{ | |
i++; | |
} | |
int minus = str[i]=='-' ? -1 : 1; | |
if(str[i]=='-' || str[i]=='+') |