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
Question 1 | |
scala> val line = "Hello, world" | |
line: String = Hello, world | |
scala> sc.parallelize(line).collect | |
res22: Array[Char] = Array(H, e, l, l, o, ,, , w, o, r, l, | |
Question 2 |
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
{ | |
"variables": { | |
"aws_access_key": "", | |
"aws_secret_key": "", | |
"aws_region": "us-east-1", | |
"version": "1.7.1", | |
"revision": "0", | |
"instance_type": "t2.micro", | |
"image_name" : "{{ env `IMAGE_NAME` }}" | |
}, |
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
{ | |
"variables": { | |
"aws_access_key": "", | |
"aws_secret_key": "", | |
"aws_region": "us-east-1", | |
"version": "1.7.1", | |
"revision": "0", | |
"instance_type": "t2.micro", | |
"image_name" : "{{ env `IMAGE_NAME` }}" | |
}, |
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
#!/usr/bin/env bash | |
echo "*** Deployment started" | |
usage() { | |
echo "(AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY) to be set" | |
exit 1 | |
} | |
if [ ${#} -ne 2 ]; then | |
usage | |
fi |
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
cd terraform | |
ssh-keygen -f mykey | |
terraform init | |
terraform plan\ | |
-out out.terraform | |
terraform apply out.terraform | |
rm out.terraform KEY |
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
data "aws_ami" "ubuntu" { | |
most_recent = true | |
filter { | |
name = "name" | |
values = ["${var.image_name}"] | |
} | |
filter { | |
name = "virtualization-type" | |
values = ["hvm"] | |
} |
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
variable "AWS_ACCESS_KEY" {} | |
variable "AWS_SECRET_KEY" {} | |
variable "region" { | |
default="us-east-1" | |
} | |
variable "image_name" { | |
default = "ami_image_name" | |
} |
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
#!/usr/bin/env bash | |
set -e | |
usage() { | |
echo "environment variable AWS_PROFILE or access keys (AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY) to be set" | |
exit 1 | |
} | |
if [ ${#} -ne 2 ]; then |
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
{ | |
"voyageLines": { | |
"type": "FeatureCollection", | |
"features": [ | |
{ | |
"type": "Feature", | |
"geometry": { | |
"type": "LineString", | |
"coordinates": [ | |
[ |
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.knoldus.user.annotation; | |
import javax.validation.Constraint; | |
import javax.validation.Payload; | |
import java.lang.annotation.ElementType; | |
import java.lang.annotation.Retention; | |
import java.lang.annotation.RetentionPolicy; | |
import java.lang.annotation.Target; |
OlderNewer