How do I connect a Macbook early 2011 to a Sony trv 340 via Firewire
Assuming that your machine is indeed a MacBook Pro 2011, you need a Firewire 800 (9-pin) to MiniDV (4-pin Firewire or i.Link in Sony speak) cable. Something like this:

https://www.amazon.com/FireWire-i-link-IEEE-1394-Cable-Clear/dp/B002RB84P8

https://www.amazon.com/Tripp-Lite-FireWire-Hi-speed-F019-006/dp/B000AAZQM2