corral icon indicating copy to clipboard operation
corral copied to clipboard

Deployment in Lambda

Open Biswajeet-Sethi opened this issue 2 years ago • 6 comments

Hello, Greetings of the day. First of I would like to thank you for sharing your marvelous work. It amazed me and I have just started exploring it.

Though I am facing issues in deploying it in lambda.

I have cloned the source code to my local system. I am also able to upload the word_count.go to a s3 bucket.

But then the command to deploy it in Lambda is not working for me. I am trying the run the command from my source code directory. Would you please guide exactly what command should i use as per my system.

thanks in advance. issue1

Biswajeet-Sethi avatar May 13 '22 04:05 Biswajeet-Sethi

What error message are you getting?

bcongdon avatar May 14 '22 14:05 bcongdon

Hello, Thank you for your response. At the same time I would like to apologize for my late reply because of my health issues.

Please find the attached screenshot with this email.

We created a test.go file and it is running fine in our system. But at the same time with word_count.go, we get the error as in the screenshot. Currently me and my friend Riya are doing our research project on map-and-reduce using your frame-work. Your help will be acknowledged.

Waiting for your reply.

[image: doubt_corral.png]

On Sat, 14 May 2022, 19:46 Ben Congdon, @.***> wrote:

What error message are you getting?

— Reply to this email directly, view it on GitHub https://github.com/bcongdon/corral/issues/13#issuecomment-1126724486, or unsubscribe https://github.com/notifications/unsubscribe-auth/AY7W3NWV42C3EVNVAOD7RRLVJ6YU3ANCNFSM5V2GJJMA . You are receiving this because you authored the thread.Message ID: @.***>

Biswajeet-Sethi avatar May 23 '22 10:05 Biswajeet-Sethi

Thanks for your response, unfortunately it doesn't look like the image made its way to Github. Could you post it there directly? (Or even better, just copy/paste the message?)

bcongdon avatar May 23 '22 13:05 bcongdon

Hello, please have a look.

I have cloned the code to the local system. Then I am trying to run it locally first.

for word_count.go < as per the code mentioned on github page>

@.***:~/Desktop/work3/corral/examples/word_count$ go run word_count.go

command-line-arguments

./word_count.go:4:57: error: expected package 4 | func (w wordCount) Map(key, value string, emitter corral.Emitter) { | ^ ./word_count.go:10:52: error: expected package 10 | func (w wordCount) Reduce(key string, values corral.ValueIterator, emitter corral.Emitter) { | ^ ./word_count.go:10:82: error: expected package 10 | func (w wordCount) Reduce(key string, values corral.ValueIterator, emitter corral.Emitter) { | ^ ./word_count.go:5:23: error: reference to undefined name ‘strings’ 5 | for _, word := range strings.Fields(value) { | ^ ./word_count.go:5:2: error: range clause must have array, slice, string, map, or channel type 5 | for _, word := range strings.Fields(value) { | ^ ./word_count.go:12:2: error: range clause must have array, slice, string, map, or channel type 12 | for range values.Iter() { | ^ ./word_count.go:15:20: error: reference to undefined name ‘strconv’ 15 | emitter.Emit(key, strconv.Itoa(count)) | ^ ./word_count.go:20:9: error: reference to undefined name ‘corral’ 20 | job := corral.NewJob(wc, wc) | ^ ./word_count.go:22:12: error: reference to undefined name ‘corral’ 22 | driver := corral.NewDriver(job) | ^ ./word_count.go:5:6: error: invalid type for range clause 5 | for _, word := range strings.Fields(value) { | ^

For exactly the code in the folder.

@.***:~/Desktop/work3/corral/examples/word_count$ go run word_count_original.go

command-line-arguments

/usr/bin/ld: /home/biswajeet/.cache/go-build/a0/a0fc8e36b057c0356495ebb151fe9873e8c79b7c700035ade1a5aee716d41bab-d(go.o): in function golang.org..z2fx..z2fsys..z2funix.RawSyscallNoError': /home/biswajeet/go/pkg/mod/ ***@***.***/unix/gccgo.go:48: undefined reference to golang.org..z2fx..z2fsys..z2funix.realSyscallNoError' /usr/bin/ld: /home/biswajeet/.cache/go-build/a0/a0fc8e36b057c0356495ebb151fe9873e8c79b7c700035ade1a5aee716d41bab-d(go.o): in function golang.org..z2fx..z2fsys..z2funix.SyscallNoError': /home/biswajeet/go/pkg/mod/ ***@***.***/unix/gccgo.go:21: undefined reference to golang.org..z2fx..z2fsys..z2funix.realSyscallNoError' /usr/bin/ld: /home/biswajeet/.cache/go-build/a0/a0fc8e36b057c0356495ebb151fe9873e8c79b7c700035ade1a5aee716d41bab-d(go.o): in function golang.org..z2fx..z2fsys..z2funix.Syscall': /home/biswajeet/go/pkg/mod/ ***@***.***/unix/gccgo.go:28: undefined reference to golang.org..z2fx..z2fsys..z2funix.realSyscall' /usr/bin/ld: /home/biswajeet/.cache/go-build/a0/a0fc8e36b057c0356495ebb151fe9873e8c79b7c700035ade1a5aee716d41bab-d(go.o): in function golang.org..z2fx..z2fsys..z2funix.Syscall6': /home/biswajeet/go/pkg/mod/ ***@***.***/unix/gccgo.go:35: undefined reference to golang.org..z2fx..z2fsys..z2funix.realSyscall' /usr/bin/ld: /home/biswajeet/.cache/go-build/a0/a0fc8e36b057c0356495ebb151fe9873e8c79b7c700035ade1a5aee716d41bab-d(go.o): in function golang.org..z2fx..z2fsys..z2funix.Syscall9': /home/biswajeet/go/pkg/mod/ ***@***.***/unix/gccgo.go:42: undefined reference to golang.org..z2fx..z2fsys..z2funix.realSyscall' /usr/bin/ld: /home/biswajeet/.cache/go-build/a0/a0fc8e36b057c0356495ebb151fe9873e8c79b7c700035ade1a5aee716d41bab-d(go.o): in function golang.org..z2fx..z2fsys..z2funix.RawSyscall': /home/biswajeet/go/pkg/mod/ ***@***.***/unix/gccgo.go:53: undefined reference to golang.org..z2fx..z2fsys..z2funix.realSyscall' /usr/bin/ld: /home/biswajeet/.cache/go-build/a0/a0fc8e36b057c0356495ebb151fe9873e8c79b7c700035ade1a5aee716d41bab-d(go.o): in function golang.org..z2fx..z2fsys..z2funix.RawSyscall6': /home/biswajeet/go/pkg/mod/ ***@***.***/unix/gccgo.go:58: undefined reference to golang.org..z2fx..z2fsys..z2funix.realSyscall' collect2: error: ld returned 1 exit status

On Mon, May 23, 2022 at 7:18 PM Ben Congdon @.***> wrote:

Thanks for your response, unfortunately it doesn't look like the image made its way to Github. Could you post it there directly? (Or even better, just copy/paste the message?)

— Reply to this email directly, view it on GitHub https://github.com/bcongdon/corral/issues/13#issuecomment-1134702640, or unsubscribe https://github.com/notifications/unsubscribe-auth/AY7W3NVZZD25V6E3RE5W3WDVLOEBJANCNFSM5V2GJJMA . You are receiving this because you authored the thread.Message ID: @.***>

-- Thanks & Regards, Biswajeet Sethi PhD Scholar | IIT -KGP | Department of CSE LinkedIN - https://www.linkedin.com/in/biswajeet-sethi-45039920/ https://www.linkedin.com/in/biswajeet-sethi-45039920/

Biswajeet-Sethi avatar May 24 '22 04:05 Biswajeet-Sethi

Hello,

Would you please look into it? Waiting for your response.

On Tue, May 24, 2022 at 9:52 AM Biswajeet sethi @.***> wrote:

Hello, please have a look.

I have cloned the code to the local system. Then I am trying to run it locally first.

for word_count.go < as per the code mentioned on github page>

@.***:~/Desktop/work3/corral/examples/word_count$ go run word_count.go

command-line-arguments

./word_count.go:4:57: error: expected package 4 | func (w wordCount) Map(key, value string, emitter corral.Emitter) { | ^ ./word_count.go:10:52: error: expected package 10 | func (w wordCount) Reduce(key string, values corral.ValueIterator, emitter corral.Emitter) { | ^ ./word_count.go:10:82: error: expected package 10 | func (w wordCount) Reduce(key string, values corral.ValueIterator, emitter corral.Emitter) { | ^ ./word_count.go:5:23: error: reference to undefined name ‘strings’ 5 | for _, word := range strings.Fields(value) { | ^ ./word_count.go:5:2: error: range clause must have array, slice, string, map, or channel type 5 | for _, word := range strings.Fields(value) { | ^ ./word_count.go:12:2: error: range clause must have array, slice, string, map, or channel type 12 | for range values.Iter() { | ^ ./word_count.go:15:20: error: reference to undefined name ‘strconv’ 15 | emitter.Emit(key, strconv.Itoa(count)) | ^ ./word_count.go:20:9: error: reference to undefined name ‘corral’ 20 | job := corral.NewJob(wc, wc) | ^ ./word_count.go:22:12: error: reference to undefined name ‘corral’ 22 | driver := corral.NewDriver(job) | ^ ./word_count.go:5:6: error: invalid type for range clause 5 | for _, word := range strings.Fields(value) { | ^

For exactly the code in the folder.

@.***:~/Desktop/work3/corral/examples/word_count$ go run word_count_original.go

command-line-arguments

/usr/bin/ld: /home/biswajeet/.cache/go-build/a0/a0fc8e36b057c0356495ebb151fe9873e8c79b7c700035ade1a5aee716d41bab-d(go.o): in function golang.org..z2fx..z2fsys..z2funix.RawSyscallNoError': /home/biswajeet/go/pkg/mod/ ***@***.***/unix/gccgo.go:48: undefined reference to golang.org..z2fx..z2fsys..z2funix.realSyscallNoError' /usr/bin/ld: /home/biswajeet/.cache/go-build/a0/a0fc8e36b057c0356495ebb151fe9873e8c79b7c700035ade1a5aee716d41bab-d(go.o): in function golang.org..z2fx..z2fsys..z2funix.SyscallNoError': /home/biswajeet/go/pkg/mod/ ***@***.***/unix/gccgo.go:21: undefined reference to golang.org..z2fx..z2fsys..z2funix.realSyscallNoError' /usr/bin/ld: /home/biswajeet/.cache/go-build/a0/a0fc8e36b057c0356495ebb151fe9873e8c79b7c700035ade1a5aee716d41bab-d(go.o): in function golang.org..z2fx..z2fsys..z2funix.Syscall': /home/biswajeet/go/pkg/mod/ ***@***.***/unix/gccgo.go:28: undefined reference to golang.org..z2fx..z2fsys..z2funix.realSyscall' /usr/bin/ld: /home/biswajeet/.cache/go-build/a0/a0fc8e36b057c0356495ebb151fe9873e8c79b7c700035ade1a5aee716d41bab-d(go.o): in function golang.org..z2fx..z2fsys..z2funix.Syscall6': /home/biswajeet/go/pkg/mod/ ***@***.***/unix/gccgo.go:35: undefined reference to golang.org..z2fx..z2fsys..z2funix.realSyscall' /usr/bin/ld: /home/biswajeet/.cache/go-build/a0/a0fc8e36b057c0356495ebb151fe9873e8c79b7c700035ade1a5aee716d41bab-d(go.o): in function golang.org..z2fx..z2fsys..z2funix.Syscall9': /home/biswajeet/go/pkg/mod/ ***@***.***/unix/gccgo.go:42: undefined reference to golang.org..z2fx..z2fsys..z2funix.realSyscall' /usr/bin/ld: /home/biswajeet/.cache/go-build/a0/a0fc8e36b057c0356495ebb151fe9873e8c79b7c700035ade1a5aee716d41bab-d(go.o): in function golang.org..z2fx..z2fsys..z2funix.RawSyscall': /home/biswajeet/go/pkg/mod/ ***@***.***/unix/gccgo.go:53: undefined reference to golang.org..z2fx..z2fsys..z2funix.realSyscall' /usr/bin/ld: /home/biswajeet/.cache/go-build/a0/a0fc8e36b057c0356495ebb151fe9873e8c79b7c700035ade1a5aee716d41bab-d(go.o): in function golang.org..z2fx..z2fsys..z2funix.RawSyscall6': /home/biswajeet/go/pkg/mod/ ***@***.***/unix/gccgo.go:58: undefined reference to golang.org..z2fx..z2fsys..z2funix.realSyscall' collect2: error: ld returned 1 exit status

On Mon, May 23, 2022 at 7:18 PM Ben Congdon @.***> wrote:

Thanks for your response, unfortunately it doesn't look like the image made its way to Github. Could you post it there directly? (Or even better, just copy/paste the message?)

— Reply to this email directly, view it on GitHub https://github.com/bcongdon/corral/issues/13#issuecomment-1134702640, or unsubscribe https://github.com/notifications/unsubscribe-auth/AY7W3NVZZD25V6E3RE5W3WDVLOEBJANCNFSM5V2GJJMA . You are receiving this because you authored the thread.Message ID: @.***>

-- Thanks & Regards, Biswajeet Sethi PhD Scholar | IIT -KGP | Department of CSE LinkedIN - https://www.linkedin.com/in/biswajeet-sethi-45039920/ https://www.linkedin.com/in/biswajeet-sethi-45039920/

-- Thanks & Regards, Biswajeet Sethi PhD Scholar | IIT -KGP | Department of CSE LinkedIN - https://www.linkedin.com/in/biswajeet-sethi-45039920/ https://www.linkedin.com/in/biswajeet-sethi-45039920/

Biswajeet-Sethi avatar May 28 '22 07:05 Biswajeet-Sethi

This error makes it look the preamble (e.g. the package and imports were deleted).

./word_count.go:4:57: error: expected package
    4 | func (w wordCount) Map(key, value string, emitter corral.Emitter) {
      |       

Did you modify that file after cloning?

bcongdon avatar Jun 14 '22 13:06 bcongdon